Communication Between Microservices

ray smith

Say you have microservice A,B, and C which all currently communicate through HTTP. Say service A sends a request to service B which results in a response. The data returned in that response must then be sent to service C for some processing before finally being returned to service A. Service A can now display the results on the web page.

I know that latency is an inherent issue with implementing a microservice architecture, and I was wondering what are some common ways of reducing this latency?

Also, I have been doing some reading on how Apache Thrift and RPC's can help with this. Can anyone elaborate on that as well?

JensG

Also, I have been doing some reading on how Apache Thrift and RPC's can help with this. Can anyone elaborate on that as well?

The goal of an RPC framework like Apache Thrift is

  • to significantly reduce the manual programming overhead
  • to provide efficient serialization and transport mechanisms
  • across all kinds of programming languages and platforms

In other words, this allows you to send your data as a very compactly written and compressed packet over the wire, while most of the efforts required to achieve this are provided by the framework.

Apache Thrift provides you with a pluggable transport/protocol stack that can quickly be adapted by plugging in different

  • transports (Sockets, HTTP, pipes, streams, ...)
  • protocols (binary, compact, JSON, ...)
  • layers (framed, multiplex, gzip, ...)

Additionally, depending on the target language, you get some infrastructure for the server-side end, such as TNonBlocking or ThreadPool servers, etc.

So coming back to your initial question, such a framework can help to make communication easier and more efficient. But it cannot magically remove latency from other parts of the OSI stack.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Communication between microservices / responsibilities

Kafka AND REST for communication between microservices?

Communication between microservices - request data

Communication between two microservices by Docker hostname

Azure Logic Apps - HTTP communication between microservices

Communication between schema stitched graphql microservices conventions

Communication between microservices with docker-compose and traefik

Service Fabric wcf communication between microservices

Communication between microservices using MassTransit and Rabbitmq

Microservices communication

Communication between asp.net website and Kubernetes/docker microservices in Azure

Can we use Web-Sockets for Communication between Microservices?

Synchronous communication microservices

Microservices internal communication

API gateway and microservices communication

Microservices communication model

How to set up a communication between 2 node.js microservices in an Azure service fabric?

Microservices: When no need asynchronous communication?

Microservices communication message templates approach

Golang microservices and communication with existing app

Inter-communication microservices - How?

Microservices communication with optional parameters requests

Authentication between microservices in Kubernetes

Passing objects between microservices

Share data between microservices

internal communication Microservices through API Gateway

Microservices communication JDBC SQL VS REST

Sharing entity ID between microservices

Join table between Different Microservices