5

Lets say I created a webapp that I want to make it more scaleable.

How it would work now

If I want to "sell" the webapp I have to do the following:

  • Rent a new hosting
  • Copy the code to the hosting
  • Create a DB and the tables and change the names in the db

The users table will be used to check the user that wants to log in and the other data tables just store data and work together (joins and so on)

This is not really scalable... you have to do allot of manual things to set up

How I want it to work

A platform (so automate most of the setting up). This will make it easier to maintain the code (centeralized codebase) and there is no hassle with creating tables/db's.

Here is where I lack overview/knowledge...

  • Do I generate new tables for each client that this client's users will use ?
  • Or do I generate new DB's each time with same name-tables ? But if some user logs in then I have to switch to another DB. (how would i check that)
  • Or can I dump all in 1 db and the same tables and create an extra column to reference which company they belong to ? The problem with this it can have performance issues over time. Count around 7800 rows for each client, each year.....

Tbh I dont expect to get allot out of it but I was always really interested how to make scaleable platforms instead of copy/pasting code to other hostings. (what I generally do)

The question is how to do this ? Its not a discussion what is the best way but more just how you can do this or how most companies do this

2

I think the term you are looking for is 'single tenant' vs 'multitenant'

ie. does one installation of your app support multiple clients, or do you install an instance (including database etc) per client.

This is not whats usually meant by scaleable, you can automate the deployment of a new instance easily enough and the separation between clients can be useful.

Overall multi-tenant solutions are seen as easier to maintain and more flexible solutions. especially if you have many small clients.After all there is nothing stopping you having multiple instances of a multi-tenant app and essentially running it in single tenant mode

  • Thanks! i didnt know the term for it now its much easier to search for information! – MichaelAngelo Nov 22 '16 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.