News for hackers. Stuff that matters.
Re:I recommend CGI instead of web frameworks by Animats on Sunday August 22, 2021 @02:48PM (#28268281)
I use FCGI with Go programs. FGCI is an orchestration system. Each worker process has a subroutine that's called when there's an incoming request, so the FCGI processes are reused for more than one task. The FCGI server will fire up more worker processes when needed, and ask them to exit when there's no work for a while. If a worker process crashes, a fresh copy is started. Every few minutes, each worker process is told to exit, so if you have a memory leak, the problem is contained.

Once you've switched to hard-compiled Go, vs. some interpreted language, you've obtained most of the possible speedups.

That's really all you need. I have a moderately busy server that's been up for over a thousand days without a reboot or restarting the FCGI service running under Apache.

You have to have a huge load before FCGI, multiple servers, a load balancer, and back-end database machines are not enough. Wikipedia used to run on something like that, until they hired too many people and had to keep them busy.

Re:I recommend CGI instead of web frameworks by speedgoose on Sunday August 22, 2021 @03:14PM (#28268547)
Why don't you use the golang http server instead?
Re:I recommend CGI instead of web frameworks by swamp_gas on Sunday August 22, 2021 @03:01PM (#28268424)
I used to use FGCI with perl. I never thought it could improve performance of GO as handler routines are already "running".

So the remaining advantage to use FCGI with Go is that memory leaks would never be an issue?