I have multiple PHP scripts running 24/7, each on different machines, that fetch information about users, from the Internet.
These users are in a table in a (postgresql) database. Every time a new user registers in the app, a new record is inserted in the table, which assigns it to one of the currently running PHP scripts (distributing the load evenly).
Is there a way so that the PHP script it has been assigned to can react in real time, in order to begin fetching information about the user immediately?
(The current setup I have is that each PHP script queries the table every 1 min, and checks if new users have been assigned to it... but more frequent queries increase database load, and in that 1 min window I am not fetching information from the newly added user.)