Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b12f598

Browse files
microservices question
1 parent 4d4cc55 commit b12f598

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ At the beginning, it was the repository with questions from Java interviews. Cur
188188
- [What is the difference between synchronous and asynchronous communication?](microservices.md#what-is-the-difference-between-synchronous-and-asynchronous-communication)
189189
- [What are possible ways for implementing authentication in microservices?](microservices.md#what-are-possible-ways-for-implementing-authentication-in-microservices)
190190
- [What is Eventual consistency?](microservices.md#what-is-eventual-consistency)
191+
- [How different types of communication can influence on performance?](microservices.md#how-different-types-of-communication-can-influence-on-performance)
191192

192193
## JavaScript
193194
- [What are possible variable scopes?](javascript.md#what-are-possible-variable-scopes)

microservices.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [What is the difference between synchronous and asynchronous communication?](#what-is-the-difference-between-synchronous-and-asynchronous-communication)
99
- [What are possible ways for implementing authentication in microservices?](#what-are-possible-ways-for-implementing-authentication-in-microservices)
1010
- [What is Eventual consistency?](#what-is-eventual-consistency)
11+
- [How different types of communication can influence on performance?](#how-different-types-of-communication-can-influence-on-performance)
1112

1213
## What are the possible ways for communication between microservices?
1314
+ ***Synchronous protocol.*** HTTP is a synchronous protocol. The client sends a request and waits for a response from the service. That's independent of the client code execution that could be synchronous (thread is blocked) or asynchronous (thread isn't blocked, and the response will reach a callback eventually). The important point here is that the protocol (HTTP/HTTPS) is synchronous and the client code can only continue its task when it receives the HTTP server response.
@@ -79,4 +80,11 @@ Rather than ensuring that the system is in a consistent state all the time, inst
7980
###### Relative links:
8081
+ https://softwareengineering.stackexchange.com/questions/354911/microservices-handling-eventual-consistency
8182

83+
## How different types of communication can influence on performance?
84+
You should prefer asynchronous communication for all remote calls. They don’t block any resources while you’re waiting for the response and you can even execute multiple calls in parallel. That can provide huge performance improvements because you just need to wait until the slowest service answered your request.
85+
86+
As always, there are several ways to implement an asynchronous communication between two services. One of them is an asynchronous REST call.
87+
###### Relative links:
88+
- https://stackify.com/communication-microservices-avoid-common-problems/
89+
8290
[Home Page](README.md)

0 commit comments

Comments
 (0)