5 ms·
Does anyone know what the theoretical limitations of trying to use Bash as a Web Server are? How many requests per second could it serve? What about HTTP/2 sup
by _Marak_ 7y ago
Does anyone know what the theoretical limitations of trying to use Bash as a Web Server are?
How many requests per second could it serve?
What about HTTP/2 support?
- jniedrauer 7y agoPerformance is kind of a meaningless question in this case, since the "bash" script makes calls to external binaries. You could write a webserver binary in C, then invoke it with bash and call it a shell script.
- Lowkeyloki 7y agoThis is a good question. I've always kind of wondered what bash's performance characteristics were compared to other programming languages. Bash certainly feels fast.
- Can_Not 7y agoMaybe you could ask the people who use/maintain this: https://github.com/avleen/bashttpd https://github.com/avleen/bashttpd
- nightfly 7y agoIt would share all the same limitations as any other forking server, plus extra overhead for any spawned child processes. Basically the same as using CGI scripts, and probably not much worse any Apached hosted PHP based website, tbh. Probably wouldn't be worth implementing HTTP/2 since it would increase the complexity with no real benefit.