Spring Cloud Session 3 Inter Microservice Communication Synchronous

In this tutorial we are going to see how microservices communicate with each other. -There are two types of communication between microservice one is synchronous, and the other is asynchronous. In synchronous communication calling microservice waits till the called microservice responds. In asynchronous communication calling microservice will not wait till the called microservice responds. In this session we focus on Synchronous communication. There are two ways a microservice can communicate with other microservices Direct: Microservice A speaks with Microservice B Directly Via Gateway: Instead of taking directly, Microservice A speaks with Microservice B via gateway This tutorial covers both the scenarios We will be developing report api which gives employee name,salary by communicating with employee-api,payroll-api microservices. For the purpose of this tutorial we developed two microservices report-api-direct which calls employee-api,payroll-api directly report-api-via-gateway calls employee-api,payroll-api via gateway Note: In real world we favour to call microservices via a gateway even for inter communication. So I recommend using the microservice report-api-via-gateway Overview Run registry service on 8761. Run employee-api service on dynamic port. Where it takes employee id and returns employee name. Run payroll-api service on dynamic port. Where it takes employee id and returns employee salary. Run report-api-direct service on dynamic port. Where it takes employee id and returns employee name and salary by directly communicating with employee-api and payroll-api. Run report-api-via-gateway service on dynamic port. Where it takes employee id and returns employee name and salary by directly communicating with employee-api and payroll-api indirectly via gateway. Run Gateway service on 8080 and reverse proxy requests to all the services (employee-api,payroll-api,report-api-direct,report-api-via-gateway) All the microservices (employee-api,payroll-api,report-api-direct,report-api-via-gateway,gateway) when they startup they register their service endpoint (rest api url) with registry Gateway Spring Cloud load balancer (Client side load balancing) component in Spring Cloud Gateway acts as reverse proxy. It reads a registry for microservice endpoints and configures routes. Important Notes Netflix Eureka Server plays a role of Registry. Registry is a spring boot application with Eureka Server as dependency. Netflix Eureka Client is present in all the micro services (employee-api,payroll-api,report-api-direct,report-api-via-gateway,gateway) and they discover Eureka server and register their availability with server. Generally Netflix Ribbon Component is used as Client Side load balancer, but it is deprecated project. We will be using Spring Cloud Load balaner in gateway https://github.com/balajich/spring-cl...

Spring Cloud Session 4 Inter Microservice Communication ASynchronous using RabbitMQ
▶︎

Spring Cloud Session 4 Inter Microservice Communication ASynchronous using RabbitMQ

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra
▶︎

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra

Kubernetes Zero to Hero: The Complete Beginner’s Guide (2025 Edition)
▶︎

Kubernetes Zero to Hero: The Complete Beginner’s Guide (2025 Edition)

Spring Cloud Session 2 Microservices Dynamic ports
▶︎

Spring Cloud Session 2 Microservices Dynamic ports

Architectural Patterns for Spring Security You Wish Your Tech Lead Knew @ Spring I/O 2026
▶︎

Architectural Patterns for Spring Security You Wish Your Tech Lead Knew @ Spring I/O 2026

Docker Containers and Kubernetes Fundamentals – Full Hands-On Course
▶︎

Docker Containers and Kubernetes Fundamentals – Full Hands-On Course

DMI Cohort 3 - Week 04 - Git & GitHub
▶︎

DMI Cohort 3 - Week 04 - Git & GitHub

Resilience4j Session 3  Making RESTAPI fault tolerant using Retry
▶︎

Resilience4j Session 3 Making RESTAPI fault tolerant using Retry

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra
▶︎

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra

No Boss, No Money: The Raw Reality of China’s Gen-Z Freelancers
▶︎

No Boss, No Money: The Raw Reality of China’s Gen-Z Freelancers

Build & Deploy a Production-Ready Patient Management System with Microservices: Java Spring Boot AWS
▶︎

Build & Deploy a Production-Ready Patient Management System with Microservices: Java Spring Boot AWS

lofi hip hop radio 📚 beats to relax/study to
▶︎

lofi hip hop radio 📚 beats to relax/study to

Google & AWS Veteran: What Top Tier Software Architects Do Differently
▶︎

Google & AWS Veteran: What Top Tier Software Architects Do Differently

Music for Work — Deep Focus Mix for Programming, Coding
▶︎

Music for Work — Deep Focus Mix for Programming, Coding

Resilience4j Session 4  Preventing cascading of failures in REST API using Circuit Breaker
▶︎

Resilience4j Session 4 Preventing cascading of failures in REST API using Circuit Breaker

Nervous System Regulation (999 Hz) | 1 hour handpan music | Malte Marten
▶︎

Nervous System Regulation (999 Hz) | 1 hour handpan music | Malte Marten

Complete Terraform Course - From BEGINNER to PRO! (Learn Infrastructure as Code)
▶︎

Complete Terraform Course - From BEGINNER to PRO! (Learn Infrastructure as Code)

ASP.NET Core Full Course For Beginners (.NET 10)
▶︎

ASP.NET Core Full Course For Beginners (.NET 10)

Java Spring Boot on AWS Tutorial | Deploy EC2, RDS & Secrets Manager (Beginner Guide)
▶︎

Java Spring Boot on AWS Tutorial | Deploy EC2, RDS & Secrets Manager (Beginner Guide)

System Design Concepts Course and Interview Prep
▶︎

System Design Concepts Course and Interview Prep