Skip to content

Commit e1caff0

Browse files
authored
Create Microservice_IMP.md
1 parent 7f1fc21 commit e1caff0

File tree

1 file changed

+146
-0
lines changed

1 file changed

+146
-0
lines changed

Microservice_IMP.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
-Dspring.profiles.active=staging
2+
java -jar application.jar --spring.profiles.active=cloud --spring.config.location=c:\config
3+
4+
5+
java -jar application.jar --spring.profiles.active=cloud
6+
7+
mvn package -DskipTests
8+
mvn package -Dmaven.test.skip=true
9+
mvn clean install
10+
-Dspring.profiles.active=peer1
11+
12+
13+
##############################################################
14+
##############################################################
15+
# LOCATION TRANSPARANCY
16+
Naming Server (Eureka)
17+
# Service Discoveries:
18+
NetFlix Eureka
19+
HashiCorp Consul
20+
Apache Zookeeper
21+
22+
# Eureka Server Discovery :
23+
CartService Eureka Client ===> Service Registry Eureka Server ===> ProducetService Eureka Client
24+
CartService Eureka Client ===> Product Service Eureka Client ===> ProducetService Eureka Client
25+
26+
Note1: eureka server Start :
27+
http://localhost:8761/
28+
29+
# HashiCorp Consul Discovery Agent :(It is Go Language)
30+
31+
http://localhost:8500/ui/dc1/services
32+
33+
# Zookeeper:
34+
# zookeper Discovery Agent
35+
zkServer.sh start
36+
Then zkCli.sh
37+
38+
39+
http://localhost:7081
40+
##############################################################
41+
##############################################################
42+
43+
# LOAD DISTRIBUTION
44+
Ribbon (Client Side)
45+
46+
#VISIBILITY AND MONITORING
47+
Zipkin Distributed Tracing
48+
Netflix API Gateway
49+
50+
#FAULT TOLERANCE
51+
Hystrix
52+
53+
# CENTRALIZED CONFIGURATION && MANAGEMENT
54+
Spring Cloud Config Server
55+
56+
# RESPONSE STATUS
57+
200 - SUCCESS
58+
404 - RESOURCE NOT FOUND
59+
400 - BAD REQUEST
60+
201 - CREATED
61+
401 - UNAUTHORIZED
62+
500 - SERVER ERROR
63+
64+
65+
# MicroService Commuication through
66+
Rest Template and Feign Client
67+
68+
# Dynamic Routing and Load Balcing using
69+
Spring Cloud Ribbon
70+
71+
###############################################################
72+
# NetFlix Zuul API Gateway
73+
74+
Desktop ---> API Gateway
75+
---> Product Service && Cart Service
76+
Mobile ---> API Gateway
77+
78+
79+
i. Reduce RoundTrips
80+
ii. Secuirty
81+
iii. Service Discovery integration
82+
iv. Cross cutting Concerns
83+
v. Load Balancing
84+
vi. Caching the reponse
85+
vii. Dynamic Routing
86+
viii. Static response handing
87+
ix Rate Limiting and throuthing
88+
89+
# API Gateways:
90+
i. Netflix Zuul API Gateway
91+
ii. Spring Cloud Gateway
92+
iii. Apigee
93+
iv. Amazon AWS API gateway
94+
v. Azure API Gateway
95+
vi. Google Cloud Endpoints
96+
vii. Express API Gateway
97+
98+
###############################################################
99+
100+
# Circuit Breaker
101+
# Monitoring : Netflix Hystrix Dashboard and Turbine
102+
103+
# Circuit Breker Implemenations:
104+
i.Netflix Hystrix (Not using)
105+
ii. Resilence4j (Using)
106+
iii. Sentinel (using)
107+
iv. Spring Retry
108+
109+
110+
# HYstrix Dashboard required : @EnableCircuitBreaker
111+
http://192.168.0.3:8695/hystrix
112+
URL : http://192.168.0.3:8695/actuator/hystrix.stream
113+
http://192.168.0.3:8695/hystrix/monitor?stream=http%3A%2F%2F192.168.0.3%3A8695%2Factuator%2Fhystrix.stream
114+
Enter: http://192.168.0.3:8695/addMycart/12
115+
116+
# TurbineStream :
117+
http://192.168.0.3:8695/hystrix
118+
http://192.168.0.3:8095/turbine.stream
119+
120+
# Distributed Tracing: using Sleuth and Zipkin Server
121+
122+
123+
# Spring Cloud Seluth :
124+
Spring Cloud Sleuth
125+
SPring Cloud Sleuth Logs are printed in the folloing format
126+
[ TraceID, SpanId, ZipKin ]
127+
128+
129+
# Zipkin
130+
Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures.
131+
Features include both the collection and lookup of this data.
132+
http://localhost:9411/zipkin
133+
134+
http://localhost:9411/zipkin/?serviceName=cartservice&spanName=all&lookback=3600000&startTs=1586642229946&endTs=1586645829946&annotationQuery=&minDuration=&limit=10&sortOrder=duration-desc
135+
136+
137+
138+
139+
140+
141+
142+
143+
144+
145+
146+

0 commit comments

Comments
 (0)