Is there a best practice for keeping/auditing between a websocket and REST API? Current setup was working relying on web sockets but starting to see feed issues and disconnects during busy times on the far end and need to look at keeping in sync between websockets and REST without risking any locking as the volume is pretty heavy.
Current Setup: Postgres database cluster that stores to track readings. The main feed comes from a pub/sub connection where a primary and secondary websocket connector gets a timestamped event and a few fields and I write write to the database. I see about 50-100 events a second.
Problem is that the sockets have started to fail on the far end (both active/standy connections drop) and delay potentailly 30 minutes before I get data again which leaves me with a gaping hole in my series.
Is there a better way to architect this to be able to consume both REST and websocket data or am I worrying too much about the database and any locking issues.