1

I have 2 microservices - "A" produces some data which is event Sourced and is replicated in microservice "B". I have a UI which talks to an API sitting on top of microservice "B" which internally uses the replicated data from "A". I have done the Availability calculation individually for both the microservices - let's say 99.5% and 99.8%. How do I calculate the Availability for the whole system? For example, if "A" is down and "B" is up, users still see the APIs working from B albeit with stale data from "A". I shouldn't be the first one to have stumbled upon this scenario...

  • 2
    The whole system has: 99.5% x 99.8% = 99.301% – Constantin Galbenu Feb 13 '19 at 11:03
  • Yours is correct for an SOA based Architecture wherein "B"'s availability is dependant on "A" availability. As I have mentioned, I do have a copy of the latest data which was event-sourced from A in B until the time A was up and running.. – Sriram Somasuntharam Feb 13 '19 at 11:56
  • How do you define the availability of a system? Stale data means the system is available or unavailable? – Constantin Galbenu Feb 13 '19 at 12:39
  • Yes...that's the whole point of discussion. Event Driven Architecture provides this cushion for me to make the Microservice B work with the latest data from A. If A isn't supposed to send new data between X:00 am to Y:00 am; although A is down while B is up, technically I am serving the latest data. I hope I am not the first person to run into something like this. – Sriram Somasuntharam Feb 13 '19 at 13:26
  • the definition of availability is based on your business. If the business considers a microservice that uses remote stale data as available then the overall availability is then the *minimum* of all independent microservices. – Constantin Galbenu Feb 13 '19 at 15:35
  • Event-driven architectural style is just an implementation detail. You could have the same problem if you use a `cron` job that copies remote data into local cache. – Constantin Galbenu Feb 13 '19 at 15:38

1 Answers1

1

Let's describe two options:

1) Your customer needs the freshest data (evaluation of some eligibilities, real-time evaluation, etc.): The microservices are dependent on each other therefore you have to multiply both availabilities 99.8% x 99.5% = 99.3%

2) Your customer does not need the freshest data (most probably some report generation): You can claim the availability of the system as 99.8%.

Bohdan
  • 11
  • 1
  • So why to multiply? You calculated the chance both being available? The question is about B showing stale data from A. – Wouter Apr 09 '20 at 16:28