A
A
a252011-04-05 16:09:32
Nginx
a25, 2011-04-05 16:09:32

NginxHttpMemcachedModule. Collecting a response from multiple keys

Good day.

There is a page that constantly requests information from the server with Ajax. At the same time, the information is updated quite rarely (for example, monitoring new messages - there a message can come once a day, and, conditionally, you need to request it every minute). In order not to pull the backend, I want to do this. In memcached, when a message arrives, put a key with a json object, which must be returned in response to an ajax request. And transfer the processing of the requests themselves to nginx, which can read memcached and give a response.

If, for example, I need to update the statuses of specific messages (of a group), it is convenient to request them in one batch. Accordingly, it is also necessary to give the answer in one pack. And the question arises: either you need to collect them in this pack on the server side, and the client somehow request the pack identifier, or shove them into separate keys, and nginx collect these keys into one using the URL that came in. Accordingly, the last option is of interest - can this module collect data from several keys, glue them and send the result out?

However, this problem may have other solutions - I would also like to hear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gaelpa, 2011-04-05
@gaelpa

SSI?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question