I have an Erlang application which spawns several (possibly thousands) processes. Each of these processes makes an http request to a remote service receiving back a json.
Once the process receives the json, it will store it on redis or send it over a rabbitmq queue where some consumer will deal with it (I am still not sure).
Since for both redis and rabbitmq I have to open a connection, I was wondering whether is better to open and close the connection in each process or to have some kind of server keeping the connection which will be called by each process.