(Sorry if this isn't the right forum. StackOverflow doesn't seem right, either. I thought there used to be a description on the home page saying what kind of questions were relevant but I can't find it today.)
I have multiple servers that will handle data for a set of clients. I don't know ahead of time which clients will connect to which servers and the clients may move between servers. I need a way for the servers to share the latest information about a client.
Say I have clients C1, C2, C3, and C4 and servers S1 and S2. The servers start up and know that the clients are C1..C4 but don't know anything about them. C1 and C2 connect to S1 and S1 maintains some state about them. Periodically, S1 shares the current state for the C1 and C2 with S2. At some point, C1 disconnects from S1 and connects to S2. S2 has slightly stale state for C1 and can mostly pick up handling C1 without any interruption.
In the mean time, C3 and C4 connect to S2 and much the same thing happens. S2 maintains state for C3 and C4 and periodically tells S1 about them. If C3 moves to S1, it already has slightly stale state.
I considered MQTT and having each server publish what it knows and subscribe to what it might want to know but the volume of data I anticipate doesn't fit MQTT's use case very well. (There might be 256k clients or more. FWIW, the client-specific data is ~64 bytes.)
Redis came to mind but doesn't seem quite right because replication seems to copy the whole instance from a master to a replica and here I have parts of the data owned (or last updated) by each server.
If Redis isn't the right tool, what are my options?
TIA.