I have created a web app where the client polls the server every 1-2 seconds for a small bit of information. I have configured a Ubuntu 12.04 droplet with Varnish as a frontend to Apache.
Here’s a real URL that I’m serving:
http://lafayettecc.org/lcc_live/event/132/progress
You can see that it returns only a single integer
If I log into my server and run apachebench I get astounding results:
====================================== $ ab -n 200 -c 200 http://lafayettecc.org/lcc_live/event/132/progress This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
[TRIMMED]
Document Path: /lcc_live/event/132/progress Document Length: 2 bytes
$ ab -n 100 -c 20 http://lafayettecc.org/lcc_live/event/132/progress This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
$ ab -n 100 -c 20 http://lafayettecc.org/lcc_live/event/132/progress This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking lafayettecc.org (be patient)…done
Server Software: Apache/2.2.22 Server Hostname: lafayettecc.org Server Port: 80
Document Path: /lcc_live/event/132/progress Document Length: 2 bytes
The performance is way worse, but that’s okay since I have to consider my own network lag to the droplet.
$ ab -n 100 -c 50 http://lafayettecc.org/lcc_live/event/132/progress This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
So, is there some reason why my droplet can handle massively concurrent requests locally, but times out when they come from the network?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi Jeff, <br> <br>Are you still experiencing this? What OS is the local machine? It seems that there is a known issue with ApacheBench on (at least) OSX, that could be causing what you’re seeing: <br> <br>http://simon.heimlicher.com/articles/2012/07/08/fix-apache-bench-ab-on-os-x-lion <br> <br>Let us know if it’s still a problem!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.