0

I am a PHP Programmer and working on community website. I am using Apache NodeJS Php and Mysql on server: 24GB RAM Intel i7 950 8Cores 8Threads 3.06GHz, 120GB SSD HDD 12GB SWAP (dedicated server) OS: Debian Wheezy. My question is should i have to separate Mysql from PHP and Node JS on 2 (two) different severs, because i am worry when more than 20 000 people will login and start browsing the website make requests to DataBase etc... Also i am using Codeigniter 2.0.13, Socket.IO for Private CHat, Chat Rooms and Notifications ->everything is inserting the data in MySQL.

I have one more server with same parameters so shoud i separate MySQL from Php ,NodeJS.

Thanks Guys

2 Answers 2

2

Is the website already running? If so you should be able to get an idea of load and the number of users and make a decision from that.

If the website is not running yet, then realistically the website is unlikely to grow from 0 to 20,000 concurrent users within the first few days (congrats if it does!). I'd launch everything on the one machine and then if the demand is growing well and the server is starting to struggle, then move the database off to another node at that point. It shouldn't be difficult to move it at a later date, or result in much, if any, downtime.

One of the websites I run processes over 2 million page views per month on a single node far, far less powerful than the one you have described. We've spent a lot of time making sure the code is very efficient though. Inefficient code can make a big difference.

0

It is hard to tell anything concrete based on the information you have given.

Only you can run profiling / tests on your application in order to find out if it performs well enough or not with a single server.

Your application code makes the most difference in performance.

3
  • Hi thanks for answer. I just make Apache benchmark and thats the info i get: ab -n 10000 -c 5 subdomain.site.com Time taken for tests:177.258 seconds Complete requests: 10000 Write errors: 0 Non-2xx responses: 9984 Total transferred:22522008 bytes HTML transferred:18783272 bytes Requests per second:56.41 [#/sec] (mean) Time per request:88.629 [ms] (mean) Time per request:17.726 [ms] (mean, across all concurrent requests) Transfer rate:124.08 [Kbytes/sec] received Percentage of the requests served within a certain time (ms) 50%:78,66%:82,75%:85,80%:87,90%:92,95%:99,98%:316,99%:409,100%:592 Mar 14, 2014 at 17:48
  • Are the most complex tasks done in the main page of your site? You should really do a more comprehensive test on the different features on the site in order to get useful performance data. You should also use the web site with a browser at the same time as you run the benchmarks, so you get a feel about the usability under load. Mar 14, 2014 at 17:52
  • thanks for advice just do it: ab -n 20000 -c 20s on 3MB loading conent+ active chat+ around 500requets (saw that in dev tools) result was this: Finished 20000 requestsConcurrency Level: 20 Time taken for tests: 222.452 seconds Complete requests:20000 Failed requests: 10281 (Connect: 0, Receive: 0, Length: 10281, Exceptions: 0) Write errors: 0 Requests per second: 89.91 [#/sec] (mean) Time per request: 222.452 [ms] (mean) Time per request: 11.123 [ms] (mean, across all concurrent requests) Transfer rate: 5119.43 [Kbytes/sec] received Mar 14, 2014 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .