This branch contains the new stack demo. To see the same demo with Spring-Cloud-Netflix stack, check out the branch old-stack.
After running all the apps execute POST at localhost:9080/application passing
cardApplication.json as body.
http POST localhost:9080/application < cardApplication.jsonab -p cardApplication.json -T application/json -c 10 -n 20000 http://localhost:9080/application- new card applications registered via
card-service - user registered via
user-service fraud-servicecalled bycard-serviceanduser-serviceto verify card applications and new users
If you want to run a bigger number of requests, you can use the ab benchmarking tool:
ab -p cardApplication.json -T application/json -c 10 -n 20000 http://localhost:9080/applicationhttp GET localhost:9083/ignored/testhttp GET localhost:9083/ignored/test/allowedignoredservice withtestendpoint returning 404 via Proxy and/test/allowedendpoint returning response from the service.
+-------+ +-------------+ +-------------+ +-------+ +---------------+ +-----------------+ +-------+
| User | | CardService | | UserService | | Proxy | | FraudVerifier | | IgnoredService | | PRoxy |
+-------+ +-------------+ +-------------+ +-------+ +---------------+ +-----------------+ +-------+
| | | | | | |
| Register application | | | | | |
|----------------------------------->| | | | | |
| | | | | | |
| | Create new user | | | | |
| |------------------------------------------>| | | |
| | | | | | |
| | | Create new user | | | |
| | |<--------------------| | | |
| | | | | | |
| | | Verify new user | | | |
| | |-------------------->| | | |
| | | | | | |
| | | | Verify new user | | |
| | | |------------------------>| | |
| | | | | | |
| | | | User verified | | |
| | | |<------------------------| | |
| | | | | | |
| | | User verified | | | |
| | |<--------------------| | | |
| | | | | | |
| | User created | | | | |
| |<--------------------| | | | |
| | | | | | |
| | | | | | User created |
| |<------------------------------------------------------------------------------------------------------|
| | | | | | |
| | Verify card application | | | |
| |-------------------------------------------------------------------->| | |
| | | | | | |
| | | Card application verified | | |
| |<--------------------------------------------------------------------| | |
| | | | | | |
| Card application registered | | | | | |
|<-----------------------------------| | | | | |
| | | | | | |
+-------+ +-------+ +-----------------+
| User | | Proxy | | IgnoredService |
+-------+ +-------+ +-----------------+
| | |
| IgnoredService/Test | |
|-------------------------------->| |
| | |
| 404 | |
|<--------------------------------| |
| | |
| IgnoredService/Test/Allowed | |
|-------------------------------->| |
| | |
| | Get allowed |
| |--------------------->|
| | |
| Allowed | |
|<--------------------------------| |
| | |
- Ribbon used via
@LoadBalancedWebClient - Ribbon configuration modified via
@LoadBalancerClient
- Routes have to be explicitly defined
- Possibility to configure routes either via properties or Java configuration
- All headers passed by default
- Routes matched using predicates, requests modified using filters
- Interactions defined using injected
CircuitBreakerFactoryvia thecreate()method - HTTP call and fallback method defined
- Circuit breaker configuration modified in
Customizer<CircuitBreakerbean in a@Configurationclass - Resilience4J used underneath
- HTTP traffic monitoring using Micrometer + Prometheus
- Added a Micrometer's
TimertoVerificationServiceClient