Lightweight HTTP application / server for static content

I need a scalable and functional HTTP application / server that will be used to upload / download static files. Therefore, I need support only for operations GETand PUT.

However, there are some additional features that I need:

  • User Authentication: I need to check the credentials for the database for each request. Thus, I must be able to integrate proprietary interactions with databases.
  • Support signed access keys: access to resources through PUTmust be signed using a key like http: // uri /? Key = foo Then the key contains information about a request of type md5 (user + path + secret), which allows me to block unwanted requests. The application / server should let me verify this.
  • Performance: I would like to avoid the contents of the pipeline as much as possible. Otherwise, the entire application may be implemented in Perl / etc. in several lines like CGI.

Perlbal (in web server mode) looks beautiful, however the single-threaded model is not suitable for my search in the database, nor does it support query strings.

Lighttp / Nginx / ... have some modules for these tasks, however, it is impossible to do everything together without finishing writing your own extensions / modules.

So how would you solve this? Are there other viewable web servers? Should I implement the application inside the web server (i.e. CGI). How can I avoid / speed up the contents of the pipeline between the web server and my application.

Thanks in advance!

+3
source share
2 answers

Take a look at nodejs http://nodejs.org/

There are several modules for static web servers and database interfaces: http://wiki.github.com/ry/node/modules

You may need to write your own file upload handler or use it from this example http://www.componentix.com/blog/13

+4

nginx + spawn-fcgi + fcgi , C + memcached + sqlite, , 20-30 . , 100-150 . 20 . , , 60 . UNIX - .

, PUT, .

+3

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


All Articles