Answer the question
In order to leave comments, you need to log in
How to reset the web server cache after replicating its local database?
Hello.
We have a Java web application distributed over several data centers (moreover, data centers in different countries). Each web application server has Tomcat installed and a local PostgresSQL database (9.4).
Streaming WAL replication (master slaves) is configured on the database.
The problem is that after data replication, on all slaves, it is necessary to reset the cache and it often turns out that the cache is reset before the replication itself, respectively, users receive old, already cached data (since access to servers is approximately 22-26K requests per second ).
Who solves such a problem?
The simplest thing that comes to mind is to simply reset by timeout, let's say in 2-3 seconds, then the replica will definitely be in time.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question