Coder Social home page Coder Social logo

iamsurajitmishra / scalable-microservices-spring-cloud Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 357 KB

SpringBlooms: A Microservices Garden with Spring Cloud (evokes growth and microservices)

Java 100.00%
actuator apigateway configserver eureka-server load-balancer microservices spring-boot rest-api hibernate jpa zipkin circuit-breaker retry-pattern

scalable-microservices-spring-cloud's Introduction

Scalable Microservices With Spring Cloud

Tech Stack

Server: Spring-Boot embeded Tomcat Server, Spring-Boot-REST-API

Client: Postman, Browser

Database: MySQL,JPA, Hibernate

Service Discovery: Spring Cloud relies on services like Eureka Server to help register and locate microservices within the application.

Configuration Management: It integrates with Spring Cloud Config Server for centralized configuration management. Individual microservices use the Spring Cloud Config Client to fetch their configurations.

Routing: Tools like Spring Cloud Gateway can be used to provide a single entry point for API requests and route them to appropriate microservices.

Resilience: Libraries like resilience4j can be used to implement features like circuit breakers and fault tolerance for handling service failures gracefully.

Other functionalities: Spring Cloud offers various other tools for distributed messaging, task execution, and monitoring in a microservices architecture.

Spring-Cloud-Architechture

Spring-Cloud-Architechture

API-Gateway architechture

API-GATE-WAY

Microservices-Communication

Microservices-communication

Service-Discovery-using-Netflix-Eureka-Server

Netflix-Eureka-Server => Service registry & Discovery

Config-Server manual refresh

Config-Server-manual-refresh

Config-Server auto refresh

Config-Server-auto-refresh

Rabbitmq integration with spring cloud bus -

### INSTALL rabbitmq
* pull rabbitmq docker image
  *  docker pull rabbitmq:3.11.0
  *  docker run --rm  -it -p 5672:5672 rabbitmq:3.11.0

Add amqp dependency inside pom.xml

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-bus-amqp</artifactId>
		</dependency>

Running Zipkin -> Distributed tracing

Pull zipkin docker image

docker pull openzipkin/zipkin

Run zipkin container

docker run -d -p 9411:9411 openzipkin/zipkin

Circuit-Breaker-Pattern

Circuit-Breaker-Pattern

Service-Host

employee-service -> http://localhost:9090

department-service -> http://localhost:8080

api-gate-way -> http://localhost:2000

config-server -> http://localhost:3000

service-discovery-> http://localhost:8761

API Reference

Get all items

  GET /api/items
Parameter Type Description
api_key string Required. Your API key

Get item

  GET /api/items/${id}
Parameter Type Description
id string Required. Id of item to fetch

add(num1, num2)

Takes two numbers and returns the sum.

scalable-microservices-spring-cloud's People

Contributors

iamsurajitmishra avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.