3. Microservices Advanced Concepts Flashcards

1
Q

What is one of the best strategies for dealing with reducing latency in microservices-based systems?

A

To not rely on a purely synchronous communication model. Leveraging event-driven, asynchronous communications is a great way to improve system health as well as support long-term objectives of moving large amounts of data over long distances in a timely fashion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can be said about error conditions in dealing with a Microservices architecture that leverages asynchronous communications?

A

Learning how to appropriately handle and respond to error conditions is critical to keeping the system healthy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do people often refer to when it comes to asynchronous communications in a Microservices architecture, and how does that work?

A

Event-driven microservices.

In this model, the services put a message into an asynchronous message broker or a temporary data store and then derive events from this new state. The downstream event processors will process the data and eventually cause the data to be stored in its final data store. Conversions will then occur through either distributed data patterns or subsequent event processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is another alternative to event-driven microservices, and how does it work?

A

Stream data platforms — a very strong pattern when building out a large system, especially with many different but interesting operations.

In a stream data platform, events are written to a central message broker. These events then trigger listener operations that take action on that data if it applies to them, such as formatting the data, causing other downstream events, or various other activities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the advantage of stream data platforms over event-driven microservices?

A

They are highly useful in large distributed systems because events often trigger multiple operations and not just one. By leveraging this platform, you can do more work with less overall stress on the system, which improves overall performance, especially in activities like logging, auditing, or inspections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What must be taken into consideration in regards to messages that fail to be processed in a microservices architecture that takes an asynchronous approach?

A

You need to take care to handle error states correctly and recover from them. If messages cannot be processed for any reason, you cannot simply ignore them. Dead letter queues must be monitored and action must be taken to process the messages, even if it’s manual processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What makes evaluating call chains and aggregating logging particularly hard in a Microservices architecture, and what must be done to tackle this?

A

When an issue arises in a Microservices architecture, it can become very difficult to see all of the moving parts, because your calls span across multiple virtual machines or containers, and separate sessions.

Early on in the process, you must plan for unified logging strategies across your entire platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In what situations do logging become useful?

A
  1. Day-to-day operations
  2. Troubleshooting
  3. Maintenance
  4. Investigations
  5. General tasks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What particular characteristics of a Microservices architecture makes logging challenging?

A
  1. Larger volume of artifacts
  2. Agile nature
  3. Different teams — different logging strategies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does moving onto a distributed system affect the need for logging?

A

As we move onto a distributed system, there is an increased need to have some sort of convergence in our logging behaviours.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When do log aggregators come into the picture for an appropriate method for logging, and what requirements do they bring?

A

They make more and more sense than traditional file-based logging as the system size grows.

Log aggregators make uniformity of logging practices much more critical so that you can coalesce them and scan them more easily.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is tracing in the context of logging?

A

Tracing is based on the concept of creating a unique token called a trace and using that trace in all internal logging events for that call stack by embedding this value in all of the logging and timing output for all of the services involved.

Each service uses the trace and then passes it downstream to all of the service calls that it makes. Each of those, in turn, do the same.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does tracing help us achieve in a Microservices architecture?

A

Aggregation of sets of log messages and timings when looking at call metrics and behaviour. Determining the behaviour from a single client interaction through a system in a microservices architecture is hard, but tracing makes this process much simpler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What makes continuous delivery particularly critical in a microservices architecture?

A

Microservices-based architectures have so many moving parts that the chances of success greatly decrease if you don’t have an automated way of building and deploying these services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Hierarchical Service Architecture?

A

It’s a hybrid architecture that should be used only as a middle step between a monolithic architecture and a microservices one, which helps prevent circular dependencies in the network. In this architecture model, you define rules about which service types can or cannot consume other service types. It models an n-tier architecture via services instead of modules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are some of the drawbacks of a Hierarchical Service Architecture?

A

Often, you have to adjust your logic and flow through the system to accommodate your artificially imposed rules. You may find yourself building or defining business processes that don’t really exist, in order to play nice in your own sandbox.

17
Q

What is Services-Based Architecture?

A

A model that is very similar to Service-Oriented Architecture, in which you leave the underlying databases alone and simply carve out your services.

18
Q

What are the benefits of a Services-Based Architecture?

A

Gaining some of the agility of the microservices model without sharding your data into separate datastores.