Answer the question
In order to leave comments, you need to log in
Is it possible to implement a PHP daemon that will keep a permanent connection to the websocket server?
The essence of the situation:
There is a site and there is a call-center (websocket-server located on a server different from the site).
The site needs to receive up-to-date information from this web socket server, the information that the site receives is the same for all users (the number of free telephone lines).
Now it's implemented like this: each visitor, each time they go to the site's pages, establishes a connection to the websocket server via javascript and receives this data. As a result, a large number of connections are created and the websocket server crashes.
It is not possible to change anything on the websocket server.
How it should work:
A PHP daemon is launched on the site server, which establishes one connection to the websocket server and receives up-to-date information every N seconds and writes it to a file.
Question:
Is it possible to implement a PHP daemon that will keep a permanent connection to the websocket server? If so, what additional libraries are needed for this?
Answer the question
In order to leave comments, you need to log in
Really, there is for example daemon.io
As a result, a large number of connections are created and the websocket server crashes.How much is big? Why is it falling? Maybe the memory is leaking somewhere?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question