10/11: Microservices Flashcards
What is a microservice
A microservice is a small application that can be
deployed independently, scaled independently,
and tested independently, and that has a single
responsibility - a single reason to change and/or a
single reason to be replaced.
what is a saga?
transactions are broken down into collections of sub-transactions called sagas
each subtransaction has a subtransaction that undos it
the saga guarantees either all of the transactions complete
or none
A FAILUREMANAGEMENT PATTERN FR DISTRIBUTED DATABASED
why are microservs good?
can be written in different languages
scales well
can scale based on what you need
loose coupling
what are key issues in MSs?
- How to decompose the application into services
• How to maintain data consistency
• How to implement queries
what are the essential traits of MSs
isolation autonomicity single responsiblity - do one thing and do it well exclusive state mobility
what is event sourcing?
similar to journaling in OS
keep a log of events. allows the log to be replayed in the event of a crash
what is xyz partitioning
x is more machines
y is diff mahcines do diff tasks
z is diff machines work on diff data
what is CQRS
Command Query Responsibility Segregation
seperates the read and write model from each other, decouples the writes and the responses to the writes
allows us to scale reads and writes independantly of each other
what is Polyglot persistence
Polyglot Persistence is a fancy term to mean that when storing data, it is best to use multiple data storage technologies, chosen based upon the way data is being used by individual applications or components of a single application. Different kinds of data are best dealt with different data stores. In short, it means picking the right tool for the right use case.
what is continous delivery
is a software development discipline where you build software in
such a way that the software can be released to product at any
time
continuously integrating the software, building executables,
• running automated tests on those executables to detect
problems
• pushing the executables into increasingly production-like
environments to ensure the software will work in production
what are the issues of mciroservices
increased complexity that comes with a distributed system
requires thorough automated testing
high level of automation required