Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:56:21+00:00 2026-06-02T15:56:21+00:00

I maintain a web application that is outgrowing a single VPS. The architecture consists

  • 0

I maintain a web application that is outgrowing a single VPS. The architecture consists of a large number of small users, each with their own subdomain. Users do not interact. Load means i have to move some users, and all new users, to another installation of the web application on a separate server.

Currently, every user subdomain falls to the same virtualhost, where a single PHP front controller displays the appropriate content based on the hostname. A single wildcard DNS record for *.mydomain.com points to the current server.

What is my best option for routing different user subdomains to different servers?

My thoughts:

  • A new top-level domain for every server. user.s1.mydomain.com, user.s2.mydomain.com and so on (inelegant and leaks information)
  • Run my own DNS server to route users between servers (extra point of failure, unfamiliar technology)
  • A central front controller / balancer that reverse-proxies every request to the appropriate server (extra point of failure, potentially limited connections)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:56:23+00:00Added an answer on June 2, 2026 at 3:56 pm

    At that point in the scaling-out of the application, I’d go with a central front load balancer. Nginx should handle any load that is being served dynamically by one single server. We have nginx as a front end for six dynamic servers and one static-content server, and there are no bottlenecks in sight on nginx.

    At your scale-point, setup nginx to handle all static content itself, and reverse proxy dynamic content to as many boxes as needed. The setup for simple proxy pass is close to:

    upstream upstream_regular_backend {
        fair;
        server 10.0.0.1:80;
        server 10.0.0.2:80;
    }
    
    server {
        listen 0.0.0.0:80;
        server_name  example.com;
        proxy_set_header Host $host;
        proxy_set_header  X-Real-IP  $remote_addr;
        location / {
            proxy_pass http://upstream_regular_backend;
        }
    }
    

    For serving static content and passing back all the rest, something like:

    server {
        listen 0.0.0.0:80;
        server_name  example.com;
        proxy_set_header Host $host;
        proxy_set_header  X-Real-IP  $remote_addr;
        index index.php;
        root /some/dir/:
        location ~ \.php {
            proxy_pass http://upstream_regular_backend;
        }
    }
    

    Naturally, if you are not using PHP, tweak the configuration accordingly.

    On the upstream definition, “fair;” will load-balance backends based on response-time. For caching motives, you may want to use “ip_hash;” instead, as it will land requests from a client always on the same server.

    Our setup is a bit further down the road. We have nginx load-balancers proxying a varnish cache, which in turn proxies the dynamic content servers.

    If you are worried about nginx being a single-point-of-failure, setup a secondary server ready to assume the frontend’s IP in case it fails.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a web application on Google App Engine that requires users to
I maintain a web application (ASP.NET/IIS7/SQL2K8/Win2K8) that needs to access documents, actually hundreds of
I'm creating a web application that will use multiple types of users (e.g. Admin,
We have a web application that periodically sends out e-mails to users. At the
I maintain a ASP.NET web application that causes a user's network connection to reset
Imagine that your web application maintains a hit counter for one or multiple pages
I was asked to improve and maintain an internal Web application used and approved
I'm in a very bad situation: I need to maintain asp.net web application hosted
I maintain a legacy ASP.Net Web application (using .Net 2.0 + SQL Server 2005
I need to maintain a legacy VB.NET web application. Data typing is, I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.