0

I have a statsite server running in kubernetes that accepts large amounts of data, aggregates it, and then writes to a postgres database.

Since this is a single point of failure in my application (and its accepting tons of data) I would like to create a replica in case of failure.

However, since our data is being aggregated, all the data needs to hit one centralized server. For that reason, I would like the replica to only accept data if the original statsite server goes down (i.e. I only want one replica running at a time).

It seems like if I just set replicas: 2 in my deployment, my traffic is going to be split between both replicas which is not the behaviour that I want.

What's the best way to implement something like this?

bugsyb
  • 5,662
  • 7
  • 31
  • 47

0 Answers0