Correct implementation of the dialogue system on the website (Architecture)?

There is a web site with high traffic (about 120K uniques per day up to 10K online).
You need to implement on the website a dialogue system (like Facebook) under HighLoad.
Current architecture: Apache, PHP-FPM (ver. 7), statics on NGINX, MySQL DB 0.2 TB.

How to properly implement a layer with node.js and where better to store the messages themselves?
Whether to use Redis and how to make the conservation message even after a reboot?
What are the current options implementation?
July 12th 19 at 17:16
4 answers
July 12th 19 at 17:18
Store the standard in the database, and to deliver to the clients using centrifugo
July 12th 19 at 17:20
With Redis, You will be hard to scale. Will have to do N redis servers on the backend. And to figure out the mechanics of load distribution between them. The type of "Bob and Bob" communicate on the basis of the Redis1, and "Bob and nick" on Redis2. And to provide in the case of loads, the ability to connect the new Redis3 in the clip on the fly in case of overflow servers. And of course it is for a fresh chat. Older need to unload from Redis and put into the archive, Postgres or Mysql.
July 12th 19 at 17:22
Can take ready jabber server? For example, ejabberd.
Good idea! He seemed more out of the box zooming is not bad? - Stanford_Rippin7 commented on July 12th 19 at 17:25
: well, on offsayte written that "designed from the very beginning for massive scalability", clustering is out of the box. I have no direct experience with it, actually, but I know that Kaspersky telemetry from installations going on in XMPP and ejabberd. - devonte.Jaskols commented on July 12th 19 at 17:28
July 12th 19 at 17:24
And a bunch of nodes with muscle much break the system? To allocate a separate server with Noda and database, implement the API, to interact with this server.

Find more questions by tags Node.jsMySQLPHPSocket.ioRedis