Thursday, February 5, 2015

Comparing FPC CGI vs FPC Embedded Web Server Application

Recently, I just tested and quite satisfied with its service. Despite free, you get a full blown OS with address that can be accessed publicly for hosting your web app. Suddenly, I think this is a good time for comparison game again.

The red corner will be FPC CGI runs though Apache and the blue one will be FPC Embedded Web Server. The source is hidden (it's my private project that eventually will be a commercial web), but the tested page is a simple templated page. The testing is done by with following result:
Quick analysis shows that embedded web server serves slightly less requests than CGI on Apache. Scrolling down a little it also shows that Apache serving time is 2 - 2.5 seconds per request, while embedded web server is consistently serves in 3 seconds per request, with 3.2 seconds in the first request probably due to loading. Scrolling down again is what surprises me. The CGI has several failures while the embedded web server successfully delivers all the requests. Note that to be fair all resources (CSS) is served by the CGI as well, just like the embedded web server.

The conclusion is, embedded web server does its job well, despite it doesn't support Keep-Alive header (for persistent connection) yet. It serves a number of requests similar to Apache and it delivers all requests completely. It seems to be good enough for small to medium traffic web applications.