Posting an architecture/design question without a picture might be a challenge in itself but I'll have a go anyway :) While a primary/secondary (previously master/slave) can be implemented by oneself I was wondering whether this doesn’t come out of the box in a container orchestration management system. Requirements:
- High availability (redundancy) but doesn’t need scaling (capacity).
- Orchestration decides which one is Primary/Secondary (or Alternates (multiples)).
- Container and application (MyApp) knows whether its Primary/Secondary (or Alternates (multiples)).
- Only the primary application (MyApp) is communicating with the service x and the physical device(s).
- Only the primary application (MyApp) forwards the responses to the secondary (with a safe mechanism in
place) so that the secondary has all the data/states up to date at all times.* Failover should happen within less than a second (e.g. 500ms).
Design:
|...Container Primary...|
|.......................| ------ Send Message -----------> |.....Service X.....|
|........[ MyApp ]......|
|.......................| < ----- Request/Response ------> |..Physical Device..|
....^...............|...
....|...............|...
..Check......Forward response from device
....|........so that secondary is always up to date
....|...............|...
....v...............v...
|..Container Secondary..|
|.......................|
|.......[ MyApp ].......|
|.......................|
Though I have left out the details I hope the overall requirements/concept is clear. Questions:
- Is there a container orchestration management that handles primary/secondary concept?
- Most importantly will my application (MyApp) hosted in the container know when it's in what state (Startup, Sync, Primary, Secondary, PrimaryOnly)?
- How is it best implemented if there is an existing concept?
PKaelin