What are pros and cons for url structure of a SaaS multi tenant web-app regarding scalability / load-balancing?
-
I would like to know the pros and cons of choosing a URL structure for a multi tenant web-application. I also think that this could impact scalability of the site when traffic grows. The dimensions of the application I see are two main things: - mini-apps - customers can register per application - the load/traffic hotspots can be for both (e.g. there could be one customer using very many resources and there could be also a mini-app which uses much more resources than other mini-apps. So we need to be able to route traffic to different machines / parts of the cluster, depending on the traffic patterns of either users and/or apps. I thought about the following: Approach 1: Main domains for each app, for guest users / anonymous: http://apps.nameofourwebapp.com/nameOfMiniApp1 http://apps.nameofourwebapp.com/nameOfMiniApp2 Once the customer is registered I thought about, where the sub-domain is the name of the company and the name of the app is part of the url: http://yourcompanyxyz.apps.nameofourwebapp.com/nameOfMiniApp1 http://yourcompanyxyz.apps.nameofourwebapp.com/nameOfMiniApp2 Approach 2: The other way round I could also imagine, where the app is the subdomain: http://nameOfMiniApp1.nameofourwebapp.com/ http://nameOfMiniApp1.nameofourwebapp.com/yourcompanyxyz What are the advantages and disadvantages of both approaches especially with regards to scaling / load-balancing? Does allow Approach 1 easier routing of traffic to different machines per customer (e.g. via Amazon Route53) than Approach 2? Thanks Christoph
-
Answer:
There seems to be 3 approaches to URL structure: https://customername.yourapp.com - a customer gets their own subdomain e.g. Server Density https://app.yourapp.com - there's a standard subdomain which is separate from your website e.g. Salesforce. https://yourapp.com - if you're not logged in you get the website, otherwise it's the app e.g. Buffer In the past there would be technical reasons for this. For #1 you can use DNS to direct customers to different server infrastructure. You could do this to segment the bigger customers into a more powerful environment or to provide different features to different customers. Or if you built your architecture badly, you'd use it separate each customer onto their own set of servers! For #2 some companies use a standard URL but have segmentation by region e.g. Salesforce uses country codes to split customers by geography (and presumably to servers closer to them). Nowadays I'd say it's mainly just a matter of preference. This is because modern load balancing and traffic routing products allow you to achieve the same kind of segmentation even on a URI level. For example, Google's Cloud Load Balancer product allows you to use https://cloud.google.com/compute/docs/load-balancing/http/url-map which can distribute requests to different pools of servers down to the URI whereas older systems might just route based on the host. So I would say pick the option you like best and then pick the technology that allows you to achieve that. All the options are fine and modern load balancer features means you're not really losing any flexibility whichever option you choose. The only thing I would say as a user is it's annoying when you have a URL which is the app and the website when you just want to visit the site, but get auto logged in!
David Mytton at Quora Visit the source
Related Q & A:
- What are pros and cons of using expansionary and contractionary fiscal and monetary policy tools?Best solution by Yahoo! Answers
- What are pros and cons of making a tattoo?Best solution by Quora
- What are the pros and cons of having a pet rabbit?Best solution by Yahoo! Answers
- What are the pros and cons of a pharmacist?Best solution by Yahoo! Answers
- What are pros and cons of neonatal nursing?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.