Which web server interface to choose?

I am planning a web service to be written in C ++. The goal is to be able to select more or less any web server to manage the service. For this to become true, I obviously have to choose a standardized interface between web servers and applications.

The known methods that I have heard of are as follows:

  • Cgi
  • Fastcgi
  • WSGI

Now, since I have absolutely no experience using these interfaces, I really don't know what to choose. However, I have some requirements.

  • should be fast enough (from what I heard it pretty much eliminates CGI)
  • easy to use in a clean C / C ++ environment (e.g. libraries must be available)
  • should provide HTTP 1.1 support (dunno, if that matters)

Thanks for any suggestions :)

+3
source share
3 answers

WSGI is for Python applications; if your language is C ++, this is not an option.

FCGI is a good way to go. FCGI can be used as standard CGI, convenient for debugging and testing, and then run as FCGI in the production process.

The performance of CGI vs FCGI depends on what you are trying to do and the amount of traffic you expect. Tasks that have a lot of startup overhead benefit most from FCGI; The FCGI controller can be configured for additional processes to handle heavy loads.

- CGI ; , , FCGI, -.

http://en.wikipedia.org/wiki/FastCGI

+5

CGI, . FCGI , , . HTTP/1.1 . - , . , .

+1

CGI/fastCGI. fastcgi, CGI. - cgi/fastcgi.

+1

Source: https://habr.com/ru/post/1734442/


All Articles