-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide real benchmark data and sever information. #4
Comments
My initial tests show there is alot of failures, with only 100 concurrents and 5 req per sec - throughput drops by 8% (unacceptable) and siege fails. Seems like averaging 1800 req/sec which is only 4x better than Any idea? Perhaps provide some sample code for me to test with. In my sample code I am using |
1M concurrent connections with 100k rps were achieved in production, not in test environment. The server had the following configuration:
Long-living keep-alive connections are established by video clients all over the world. Clients periodically send event requests to the server over these connections. The server pushes event data to db and sends back just transparent pixel. Every client sends an event every 10 seconds on average.
Less than 100ms from the client side.
The main bottleneck was 1Gbit network, so we moved to 10Gbit :) We moved to 32-CPU, 128GB RAM, 10Gbit server now. Preliminary results show that the server could handle over 500K rps. Unfortunately we have no 5M concurrent clients yet for testing such a load :(
The rps seems too low for both net/http and fasthttp. Maybe your request handler is too heavy. See sample code from the pull request to TechEmpower benchmarks. |
FYI, server process ate 10Gb of RAM when serving 1M concurrent connections, i.e. ~10Kb per connection, including memory required for pushing event data to db, memory fragmentation and GC overhead. |
thanks for the example, it's useful 👍 |
@abacaj, perhaps, those errors are caused by small pool and unlimited dialing (see golang/go#6785) |
@rkravchik judging from the first lines of your screenshot you aren't using keep-alive connections and your system/user ran our of available file descriptors or address:port combinations. If you're going to do a benchmark please do it properly. |
@erikdubbelboer it was reply to the second post. Address your message to the proper reciepient. |
@rkravchik I'm so sorry, apparently I wasn't awake yet and didn't notice you were quoting a previous comment. You can use |
@erikdubbelboer net/http/Transport also have: As I can see in code Client.MaxConnsPerHost is a hard limit that caused ErrNoFreeConns error. And there is no way to have such problem that exist in net/http/ below go 1.11. Am I right? |
@erikdubbelboer thank you for your patience. |
The claim for 1m concurrent connections is a pretty big one. Please provide the following:
Thank you.
The text was updated successfully, but these errors were encountered: