I’ve been reading books about distributed systems: principles and paradigms for over 3 weeks, this is one of the technical books so far that I’ve read this year. I would recommend this book, and it should have been read by all software engineers. There are a few things that I got after reading this book and trying to understand it and relate it to our current systems:

  • When we deal with unreliable networks, disruption, service failures, and so on and this is probably causing our data could be partially loss or fully lost, only 2 reasonable approaches that we probably can implement: sacrificing availability or sacrificing consistency
  • If we tend to pick up to sacrifice availability and segmenting on consistency, we need to ensure that if our services just go down because failures happen, we must guarantee that our services can be fixed and back alive again in acceptable manners (for example one hour down, and after that up again)
  • However, sacrificing availability for data consistency itself is not guaranteed that the data will be consistent since they can be outdated due to the significant network partition.
  • For some reason, sacrificing availability is not the top priority since if our services went down, there are several greater losses that we could encounter such as a reduction in revenue, distrust from customers or users, and so on, thus in such situations, one of the viable solutions is might sacrifice the response time not as so fast before (this is just want to ensure no matter what happens, our services must be available)
  • However, if we tend to choose this option, again, there’s no guarantee that the availability won’t be trouble, since the content that the user sees probably would be outdated or the transaction that the user did become duplicated since there was performance degradation
  • To respond to these 2 issues, actually, there are a lot of solutions that could be implemented but it’s worth noting that most of the solutions are not silver bullet because we need to comprehensively understand how our systems work. If we talk about the CAP theorem proposed by Brewer, we eventually can’t choose all of the options but we can evaluate and prioritize, and adjust it based on our needs