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

  • Home
  • SEARCH
  • 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 544327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:38:34+00:00 2026-05-13T10:38:34+00:00

Consider a web app in which a call to the app consists of PHP

  • 0

Consider a web app in which a call to the app consists of PHP script running several MySQL queries, some of them memcached.
The PHP does not do very complex job. It is mainly serving the MySQL data with some formatting.

In the past it used to be recommended to put MySQL and the app engine (PHP/Apache) on separate boxes.

However, when the data can be divided horizontally (for example when there are ten different customers using the service and it is possible to divide the data per customer) and when Nginx +FastCGI is used instead of heavier Apache, doesn’t it make sense to put Nginx Memcache and MySQL on the same box? Then when more customers come, add similar boxes?

Background: We are moving to Amazon Ec2. And a separate box for MySQL and app server means double EBS volumes (needed on app servers to keep the code persistent as it changes often). Also if something happens to the database box, more customers will fail.

Clarification: Currently the app is running with LAMP on a single server (before moving to EC2).

  • 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-13T10:38:34+00:00Added an answer on May 13, 2026 at 10:38 am

    You need to measure carefully how much memory overhead everything has – I can’t see enginex vs Apache making much difference, it’s PHP which will use all the RAM (this in turn depends on how many processes the web server chooses to run, but that’s more of a tuning issue).

    Personally I’d stay away from enginex on the grounds that it is too risky to run such a weird server in production.

    Databases always need lots of ram, and the only way you can sensibly tune the memory buffers is to have them on dedicated servers. This is assuming you have big data.

    If you have very small data, you could keep it on the same box.

    Likewise, memcached makes almost no sense if you’re not running it on dedicated boxes. Taking memory from MySQL to give to memcached is really robbing Peter to pay Paul. MySQL can cache stuff in its innodb_buffer_pool quite efficiently (This saves IO, but may end up using more CPU as you won’t cache presentation logic etc, which may be possible with memcached).

    Memcached is only sensible if you’re running it on dedicated boxes with lots of ram; it is also only sensible if you don’t have enough grunt in your db servers to serve the read-workload of your app. Think about this before deploying it.

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

Sidebar

Related Questions

To put the question into some context, the system exposing the web service uses
Consider the senario , I am using servlets with httpSession object in servlet and
Consider have this line of code: List<HtmlGenericControl> listOfDivs = this.clientGrid.Controls.OfType<HtmlGenericControl>() .ToList<HtmlGenericControl>(); The OfType<>(); isn't
We have a web application (quite a heavy-weight one) that does a whole bundle
I need to create a project that has a web frontend to manage synchronous
I'm very interested in making real-time web apps with Django. Unfortunately, I'm having more
I would like to understand the ServiceBehavior.ConcurrencyMode property. Consider the following code on service
I've CRM server and 2 Sharepoint servers, one for internal operators among several agencies
Consider the following code snippet: std::vector<int> v; v.reserve(100); v.insert(v.end(), 100, 5); v.erase(v.begin(), v.end()); std::cout
consider the following test class: [TestClass] public class ExampleTests { [TestMethod] public void FileDoesNotExists()

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.