set up 1 database per domain

Just an idea that I am entertaining, suppose that I have and

Both are the exact same web application (code level) with different databases. will use databaseA and DomainB will use databaseB. However, DomainA and DomainB use the same codes.

How do I setup something like that? What happens if I have 1000 of them? Does the web application slow down? Is the setup feasible?

Thank you

Maybe this helps

Thanks, it did

thanks for the tip. i will try it out