1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do I achieve more than 500 concurrent users?

Discussion in 'Site & Server Administration' started by Brad77, Oct 29, 2013.

  1. #1
    I had a JM Load test done and here are the results:

    100 User Load has no issues. 500 User load in 50 seconds also has no issues but with 500 concurrent requests it generates error and refusing connection with the server.

    My site is custom PHP with a MySQL database!


    Are there easy ways I can achieve higher performance and concurrent users? I would like at least 5000-8000 concurrent users.

    This is my server config:
    VPS Server
    • OS: Linux CentOS
    • RAM: 2 GB
    • Storage: 60 GB ‡‡
    • Bandwidth: 2,000 GB/mo
     
    Brad77, Oct 29, 2013 IP
  2. ironcladservers

    ironcladservers Well-Known Member

    Messages:
    389
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    115
    #2
    3 options. Increase the hardware/service itself. Optimize the web/MySQL servers accordingly. Decrease the load-per-visit on your site by changing/reducing the amount of things that need to load (such as removing plugins/extras, reducing overall amount of MySQL queries and slow queries, etc...).
     
    ironcladservers, Oct 29, 2013 IP
  3. Brad77

    Brad77 Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #3
    You mean uping the RAM? You think 8GB of RAM would do it?
     
    Brad77, Oct 29, 2013 IP
  4. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #4
    Whats the error message?
     
    HowDoYou, Oct 29, 2013 IP
  5. Brad77

    Brad77 Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #5
    error message is connection refused
     
    Brad77, Oct 29, 2013 IP
  6. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Who is your host?
     
    HowDoYou, Oct 30, 2013 IP
  7. Brad77

    Brad77 Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #7
    Brad77, Oct 30, 2013 IP
  8. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #8
    So it is your code.
    Did you write it?
    What is the biggest request your sending to your DB at any given time?
    You may need to re-think your DB structure.
     
    HowDoYou, Oct 30, 2013 IP
  9. Brad77

    Brad77 Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #9
    I did not write it and hired someone to do it. So do you think it would be best to have someone that is an expert with MySQL analyze the DB for performance, etc and then make suggestion on how to improve it?
     
    Brad77, Oct 30, 2013 IP
  10. Techking

    Techking Well-Known Member

    Messages:
    611
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    130
    #10
    1.Upgrade your VPS
    2.Use Nginx + Varnish with best configuration .Hire any professional for that or pm me for same.
    3.Change your host and better to host your vps in VPS oriented webhost .

    Let me know the status .
     
    Techking, Oct 31, 2013 IP
    matt_62 likes this.
  11. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #11
    Yup
    If you can afford $80 I'll do it for you. Or try the buy sell trade programming Forums on here.
    Doesn't matter if you upgrade your vps or not, of its badly optimized code it's not going to work

     
    HowDoYou, Oct 31, 2013 IP
  12. matt_62

    matt_62 Prominent Member

    Messages:
    1,827
    Likes Received:
    515
    Best Answers:
    14
    Trophy Points:
    350
    #12
    Techking is right, as his suggestion #2 will help, but unless you are close to your cpu/ram limits then upgrading this wont necessarily solve the issue.

    I will add that if you upgrade to SSD drives, that this will help, but, you will still need to optimize your site. IMO, $80 is cheap (you could easily waste more then $80 if you throw it away at needless upgrades that dont help, and then you would still need to hire someone to optimize it).
     
    matt_62, Oct 31, 2013 IP
  13. bitronictech

    bitronictech Active Member

    Messages:
    74
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #13
    If you are not having load issue with high users, (just concurrent) while the above suggestions are not bad, it is probably just as simple as you Apache configuration not allowing more then 500 concurrent connections. OP, I would look at your Apache config and see if that is the case before doing anything further. However Nginx with PHP-FPM and MySQL optimizations never hurt :)
     
    bitronictech, Nov 5, 2013 IP
  14. evtimii

    evtimii Active Member

    Messages:
    55
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    70
    #14
    "Connection refused" sounds like you probably still have resources, but the connection limit was reached.

    Check your firewall and web server configuration.
     
    evtimii, Nov 8, 2013 IP
  15. Brad77

    Brad77 Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #15
    "it is probably just as simple as you Apache configuration not allowing more then 500 concurrent connections. OP, I would look at your Apache config"

    So do I need a database administrator to look a this or if I tell my developer about this will he know where to find this configuration to adjust it. Can you give me an example on what this should or would look like?

    And how do I know we have set it to high? What if I want 10,000 concurrent users is there a way to check and see if that will work and then the load time, etc
     
    Last edited: Nov 8, 2013
    Brad77, Nov 8, 2013 IP
  16. bitronictech

    bitronictech Active Member

    Messages:
    74
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #16
    For 500 you can just have you develop modify the settings. However to examine your database will be important as you scale. 10000 concurrent users would require some serious load balancing and multiple dedicated servers using something like Apache Hadoop.
     
    bitronictech, Nov 8, 2013 IP
  17. Brad77

    Brad77 Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #17
    Why would 10,000 concurrent user require that? Is that based on the set up above.

    I am actually putting on this set up. Is this good? I feel I need a dedicated.

    Single Quad-Core E3-1240 3.4Ghz 8M 1333 w/ HT
    32GB RAM
    2x1TB SATA2 Enterprise Drives 7200RPM
    Hardware RAID 1
    CentOS 64Bit
    cPanel/WHM + Softaculous - Requires CentOS
    /29 IP Space 4 Usable
    20TB on GigE + Free Incoming
     
    Brad77, Nov 9, 2013 IP
  18. matrafox

    matrafox Active Member

    Messages:
    164
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    88
    #18
    Hello
    What your app is doing ? If your app is only serving a image or short response and don't need to to heavy query on mysql, then a small server is good also with nginx . I think first of all a linux administrator should take a look on your vps, to check if there are mysql slow querry also what is the load in current configuration . If you are serving a image the httpd max clients can be increase but if you are doing heavy mysql query then you need another server. Also another question is you are doing more insert , or more select.
    Also, I think that for 10.000 concurrent you need more server with load balancing , but like I say first of all someone should take a look what is happening there. Because if you want to output "hello world" then this can be cached and served from one server but if you want to make 10.000 inserts into mysql then is another story .
     
    matrafox, Nov 13, 2013 IP