Giter Site home page Giter Site logo

spring-zipkin-sleuth-services-serviceregistry-log-tracing-api-gateway-hytsrix's Introduction

Services
ServiceRegistry
Log Tracing
API Gateway
Hytsrix

Screenshot 2023-01-12 at 11 59 02 PM

All the microservices will be connected to the service registry, 
so that we call get an idea about what all the microservices
available and the status of all the microservices.

All the requests will be sent to API Gateway first then they are
forwarded to corresponding services via url reference or pattern. 

Using timeout , we can check whether a particular service is working 
or not. A fallback method will be triggered in case the response is
not generated in a given time frame doesn't work.

Using Hystrix Circuit Breaker we can visualise how much the api
endpoints are failing and how much are getting successful. And 
which microservice is not working.

Repeated configurations can be placed at config service as it is
not a best practice to include them at all the services.

Distributed logging can be to identify which microservice is getting 
failed and where the request is traversing.

For this , we can make use of sleuth and zipkin server , zipkin client at the services.

Sleuth provides multiple flags like service id using which we can identify which of the services
is getting called , ( service ) application name, traceid ( unique id along the entire request , same for all the services ) , spanid ( one span id for each and every service) and exportable flag.
 
traceId: It is a unique Id assigned to the request and is the same across all the microservices. spanId: It is a unique Id assigned to each operation. exportable: It is a boolean value and represents whether the log should be exported to Zipkin or not.
 
 
For centralised logging frameframework we can also implement elk stack
For 2 microservices we can easily make api calls but when there are multiple microservices
exchanging info. b/w them becomes difficult . And also scaling will not be so easy.
We can create a service registry and it will maintain all the endpoints for it. It will have information about all the microservices including their status updated , url info. and port no.
Requests will come to API Gateway first and based on url pattern , they will be traversed.
application.yml can be used for the ApplicationContext . Whenever the application starts, spring boot will make use of this file.

https://zipkin.io/pages/quickstart

curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar

Screenshot 2023-01-17 at 1 50 52 AM

Screenshot 2023-01-17 at 1 52 50 AM

Screenshot 2023-01-17 at 1 54 08 AM

Screenshot 2023-01-17 at 1 55 58 AM

Screenshot 2023-01-17 at 2 02 59 AM

Screenshot 2023-01-17 at 2 10 09 AM

Screenshot 2023-01-17 at 2 11 19 AM

Screenshot 2023-01-17 at 2 12 26 AM

Screenshot 2023-01-17 at 2 13 27 AM

fallback will trigger when department service doesn't work via hystrix circuit breaker

Screenshot 2023-01-17 at 2 14 54 AM

Screenshot 2023-01-17 at 2 15 28 AM

Screenshot 2023-01-17 at 2 16 09 AM

Screenshot 2023-01-17 at 2 18 08 AM

Screenshot 2023-01-17 at 2 19 30 AM

Screenshot 2023-01-17 at 2 36 54 AM

Screenshot 2023-01-17 at 2 21 09 AM

Screenshot 2023-01-17 at 2 21 35 AM

Screenshot 2023-01-17 at 2 34 55 AM

Screenshot 2023-01-17 at 2 23 10 AM

Screenshot 2023-01-17 at 2 32 34 AM

Screenshot 2023-01-17 at 2 30 24 AM

spring-zipkin-sleuth-services-serviceregistry-log-tracing-api-gateway-hytsrix's People

Contributors

saiashish9 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.