On Mon, Dec 15, 2025 at 09:28:56AM +0530, Mayuresh wrote: > I am considering developing a web application. It's a user interface to a > system of records. No fancy widgets. In fact no javascript. It is expected > to work with elinks as a client. > > While I'd usually choose Python for such application, I am deliberately > choosing C++ this time, to get a first hand experience of the current C++ > ecosystem to build web applications. > > Nearly half of its usage will be on localhost and rest half over the web. > > For localhost usage I can reduce the overheads of TLS and in fact a full > web server, too. For example, I can use a local web server like > cpp-httplib. > > For web usage I am considering lighttpd. Now I have two options: > > 1. Use FastCGI with lighttpd (no cpp-httplib). > > 2. Use reverse proxy with cpp-httplib server, and use the same cpp-httplib > server for localhost interactions without lighttpd in picture.
I would certainly use FastCGI here, simply because of the complexities of handling HTTP correctly, e.g. https://en.wikipedia.org/wiki/HTTP_request_smuggling > Intuitively I feel cpp-httplib would perform better on localhost (No TLS, > No IPC) than lighttpd + FastCGI. > > I did some quick trials and find the results that are a bit > counter-intuitive to me. > > lighttpd + FastCGI + TLS with elinks as client gives a much snappier feel > than cpp-httplib standalone server + no TLS with elinks. > > Is this something to be expected? Are there any other choices for above > mix of requirements? Not really expected if everything is implemented correctly. Maybe something to do with concurrent connections not being handled in the best way with cpp-httplib? Christof -- https://cmeerw.org sip:cmeerw at cmeerw.org mailto:cmeerw at cmeerw.org xmpp:cmeerw at cmeerw.org
