[Contentless] ITT you post right now [ASAP] your current thought [Brains][Thinking][Personal][#33] (999)

772 Name: (*゚ー゚) : 1993-09-9481 09:21

You've failed your DevOops buzzword exam. No mention of Docker or k8s.

With CGI you need a separate server (basically only Apache) to take http requests and format them for the script. It's also one OS process per request; even with mod_perl or mod_php it's still a thread per request. Heavy on server resources. But that doesn't matter for a forum with 3 users.

The alternative (socket bind + listen loop) can be much lighter and doesn't try to abstract away the concept of network sockets (reducing bug surface area). You get to take advantage of green threads and non-blocking IO. You also don't need a separate server unless you don't want to deal with HA or TLS yourself (and then you can just shove it behind nginx). You can use any language, too, basically, since all it needs is a handful of socket functions rather than an entire CGI library. Low OS resource usage per request also raises the bar for DoS attacks like slowloris.

TL;DR CGI works, sure, but the alternative is simpler and therefore faster and safer.

This thread has been closed. You cannot post in this thread any longer.