Does anybody here have any experience with Go's garbage collection pauses with large stack sizes? I've got a scala app that regularly consumes about 48G of ram, and I'm very happy with the response times during heavy loads like this, but the P99.5 is abysmal because of garbage collection. I've tried tuning it, but it doesn't seem like anything I do helps. I'll probably end up using an Azul JVM but I'm curious how oth…
What is P99.5?
Handling 1M Requests per Minute with Go
41–50 of 109 posts
Re: Handling 1M Requests per Minute with Go
#42Earlier quoted context omitted.
Go is 1-2 orders of magnitude faster than Ruby, and much easier to write concurrent code in. It makes perfect sense to me. What would you have recommended them, for a reasonably-high-performance server implementation? (Please don't say C.) https://benchmarksgame.alioth.debian.org/u64q/benchmark.php?...
Lua would beat go every day of the week.
Re: Handling 1M Requests per Minute with Go
#43Does anybody here have any experience with Go's garbage collection pauses with large stack sizes? I've got a scala app that regularly consumes about 48G of ram, and I'm very happy with the response times during heavy loads like this, but the P99.5 is abysmal because of garbage collection. I've tried tuning it, but it doesn't seem like anything I do helps. I'll probably end up using an Azul JVM but I'm curious how oth…
What is P99.5?
Re: Handling 1M Requests per Minute with Go
#44It's interesting this came up today. I'm looking for a new language to migrate my flask/uwsgi web service to. I'm having a terrible time making it scale. Are there any tutorials/templates/best practices for writing a small web service in Golang?
the only reason to write something like that in Go is if you're looking to impress a recruiter at (Go). Advise: pick a better tool for your problem.
Re: Handling 1M Requests per Minute with Go
#451) Take the original code, do the upload exactly in place in the original request (not even spawning a goroutine). However: protect the upload with a semaphore which only allows N-in-flight.
My reasoning is, well, if the system operates with low latency when operating nominally, blocking the incoming request isn't too painful. The reason there was a problem in the first place that there were too many requests in flight and the system hit a meta-stable state where no requests could complete efficiently.
2) (or instead of (1)): If you're going to have a worker pool, why have that complicated chan-chan-Job business? It seems that `func StartProcessor` was close to being a viable solution. All you need is to start a few of those in parallel, each reading from the same `Queue`. Was there a reason to introduce the `WorkerPool chan chan Job`? That looks quite a bit more complicated than it needs to be. The queues don't need to be separate per worker unless there is some other substantial reason.
--
The next thing one would need to take care of is to ensure that the whole system doesn't stall due to a broken/laggy network, so, to put some timeouts on the S3 uploads, for example, to ensure the system can return to a stable state on its own when the thundering herd has passed.
Re: Handling 1M Requests per Minute with Go
#46Re: Handling 1M Requests per Minute with Go
#47Earlier quoted context omitted.
the only reason to write something like that in Go is if you're looking to impress a recruiter at (Go). Advise: pick a better tool for your problem.
A better tool such as?
Re: Handling 1M Requests per Minute with Go
#48What's the trick to resubmit without getting stuck going to the first post? For example, I submitted this story 2 hours before this one: https://news.ycombinator.com/item?id=9844826 In the past, when I try to submit a story, even if it's a couple days old, the submission is ignored, and my vote is added to the original.
Re: Handling 1M Requests per Minute with Go
#49Earlier quoted context omitted.
the only reason to write something like that in Go is if you're looking to impress a recruiter at (Go). Advise: pick a better tool for your problem.
This is terrible advice. Golang may have a flavor-of-the-week status in some people's minds, but it's a language that really deserves more credit. It is really easy to program and learn, and it does a lot of stuff other languages rely on third party programs for. With each release, nagging issues (namely around garbage collection) are getting resolved, but it's more than production ready. To ignore Golang right now w…
I do enjoy coding in Golang, but we use mostly Java where I work, and for us, the benefits don't make up for the things we lose. This blog post is a great example: the solution they had to find is the first thing you'd probably do in Java, because Java has a standard package with all sorts of concurrency patterns.
Re: Handling 1M Requests per Minute with Go
#50What's the trick to resubmit without getting stuck going to the first post? For example, I submitted this story 2 hours before this one: https://news.ycombinator.com/item?id=9844826 In the past, when I try to submit a story, even if it's a couple days old, the submission is ignored, and my vote is added to the original.
Please only do this if you really believe that you should resubmit.