High performance web server (but dumb)

I am trying to write a very simple web server that does the following:

  • Get a request.
  • Answer with a tiny file; close the connection.
  • Process request data.

In other words, the answer is independent of the request information, but the request information is still important. Data will be saved and then used for analytics.

I tried to do this with some event-based frameworks, but they all seem to support the connection until the processing code returns. This makes sense, because usually the server should not do any work after the response, but in my case there is no need for this specific way of doing things.

Ideally, the server should continue to respond to requests while the request data is pushed onto the stack, which is freed up as it is saved.

We expect to process thousands of requests per second. Is event-based programming really capable, or should I stick with (traditional) threads? Which language or structure is more suitable for this kind of work?

Thank.

+3
source share
2 answers

Node.js? http- , javascript. , , , , , .

, .

+1

, , ( , ) - , . , beanstalkd RabbitMQ.

beanstalkd , , , , .

0

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


All Articles