Home

Awesome

Sample Credit Card application eco-system

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.json
ab -p cardApplication.json -T application/json -c 10 -n 20000 http://localhost:9080/application

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/application
http GET localhost:9083/ignored/test
http GET localhost:9083/ignored/test/allowed
+-------+                         +-------------+       +-------------+          +-------+             +---------------+ +-----------------+ +-------+
| 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 |                      |
    |<--------------------------------|                      |
    |                                 |                      |

Setup using new stack

Client side load-balancing using LoadBalancerClient

Apps communicating via Gateway:

Spring Cloud Circuit Breaker + Resilience4J

Micrometer + Prometheus