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 6122049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:51:13+00:00 2026-05-23T15:51:13+00:00

We are preparing to scale the API side of an API-heavy web application. My

  • 0

We are preparing to scale the API side of an API-heavy web application. My (technically savvy) client proposes a rather unconventional approach to this: instead of balancing the load to several app servers, which would talk to a sharded database, he wants us to:

  • “shard the app servers”, putting both app server code and db on each physical server, so that the app server only connects to its own db shard;
  • have the app servers talk to each other when they need to access other shards (instead of talking to another shard’s DB directly);
  • have the API client pick an app shard itself (on the client side, based on some stable hash) and talk directly to it.

The underlying reasoning is that this is the most natural thing to do it, and that this would allow us to move to a multisite distributed system in the future.

(The stack is PHP + Node.js on MySQL, although at this point a transition to MongoDB is considered too.)

Now, I don’t see huge problems with it off the shelf. It might get somewhat cumbersome to code these server-to-server interactions, but then it will surely have its own benefits. Basically I’m at a loss on whether this is a good idea or not.

What pros and cons come to your mind? I’m looking for technical issues and advantages here. Thanks!

  • 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-05-23T15:51:14+00:00Added an answer on May 23, 2026 at 3:51 pm

    This is just plain bad for many reasons.

    • The API client should not know which app shard to talk to. This will limit you in ways you probably can’t foresee now, but may/will become a problem in the future. The API client should play dumb so you can route requests appropriately if an app server dies, changes, gets sharded again etc.
    • What happens if your app code or database architecture is slow? (Not both at the same time, just one). Now you have a db shard slowing down an app shard.
    • Your db+app shards will need to keep both app code+memory and db code+memory in RAM. This means the CPUs will spend more time swapping code and memory in and out to perform both sets of tasks.
    • I’m finding it hard to put down in words, but this type of architecture screams ‘bad coupling’ and ‘no separation of concerns’ (probably not the right terminology but I hope you understand what I mean). You are putting two distinctly different types of applications (app server and database) onto one box. The management nightmare of updating them and routing around failed instances will be very difficult.

    I hate to argue my point this way, but a lot of very smart people have dealt with these problems before and I’ve never heard of this type of architecture. There’s probably a reason for it. Not to mention there’s a lot of technology and resources out there that can help you handle traditional sharding and load balancing of app and database servers. If you go with your client’s suggested architecture you’re on your own.

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

Sidebar

Related Questions

I'm preparing project for web application with large AJAX usage, which should work on
My application is preparing a cover-sheet for submitting documents by fax. I identify the
I am preparing a project proposal for a client who wants to publish video
Preparing for exam and got stuck at this question: Allowed operators are <<,+,& no
I am preparing for my interview tomorrow -- I need the answer to this
I'm preparing to embark on a web app development that will make little to
Preparing for the migration of asp-application with Windows 2000 (web1) on Windows 2003 (web2).
I'm preparing to do an .NET exam and I came across this question. I
We're preparing to create a web-centred platform for schools, and we were planning to
I'm preparing a maven2 web project for continuous integration. I use the maven cargo

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.