Answer the question
In order to leave comments, you need to log in
AIOHTTP, server side emit events?
Hello.
1. How to emit events on the server side?
https://github.com/aio-libs/sockjs/ - I use
Everything I took from an example, the bottom line is that I don’t want to send anything from the client, but only accept it.
For example, I made an entry in the database and I want to send it to the client, but I can’t figure out how.
2. Application deployment
https://docs.aiohttp.org/en/stable/deployment.html... - followed these settings
And here we have
http {
upstream aiohttp {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
# Unix domain servers
server unix:/tmp/example_1.sock fail_timeout=0;
server unix:/tmp/example_2.sock fail_timeout=0;
server unix:/tmp/example_3.sock fail_timeout=0;
server unix:/tmp/example_4.sock fail_timeout=0;
# Unix domain sockets are used in this example due to their high performance,
# but TCP/IP sockets could be used instead:
# server 127.0.0.1:8081 fail_timeout=0;
# server 127.0.0.1:8082 fail_timeout=0;
# server 127.0.0.1:8083 fail_timeout=0;
# server 127.0.0.1:8084 fail_timeout=0;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question