2. Services Setup: Scenario #1
Service A
Service B
Service C
Service C
Setup #1
Setup #2
Service A:
Spring MVC using
RESTTemplate
Service B:
Spring Reactor using
WebClient
Service C:
Spring Reactor
Takes 200ms to
respond to a HTTP
GET
GET /items/{category}
GET /items/{category}
3. Test Setup
Service A Service C
AWS
t2.micro t2.micro t2.micro
Service B Service C
AWS
t2.micro t2.micro t2.micro
5. Expected Performance
Service B using Non-Blocking Architecture should outperform
Service A as the number of concurrent users increase.
Service B should have higher CPU Utilization.
Service B should have lower response time and higher throughput.
9. Services Setup: Scenario #2
Service A1
Service B
Service C
Service C
Setup #1
Setup #2
Service A1:
Spring MVC using
RESTTemplate
WebClient
Service B:
Spring Reactor using
WebClient
Service C:
Spring Reactor
Takes 200ms to
respond to a HTTP
GET
GET /items/{category}
GET /items/{category}
10. Expected Performance
Service A1 should outperform Service A. Service B should
outperform both Service A and Service A1.
Service A1 should have higher CPU Utilization than Service A.
Service A1 should have lower response time and higher throughput
compared to Service A.
11. Performance
Results
A R C H I T E C T U R E
S T Y L E
C O N C U R R E N T
U S E R S
E X E C U T I O N T I M E
( S E C O N D S )
R A M P - U P T I M E
( S E C O N D S )
T H R O U G H P U T
( P E R S E C O N D )
A V G .
R E S P O N S E
T I M E ( M S )
A (MVC-RT) 1000 600 10 965 1024
A1 (MVC-WC) 1000 600 10 1241 797
B (Reactive) 1000 600 10 1777 555
A (MVC-RT) 1500 600 10 958 1546
A1 (MVC-WC) 1500 600 10 1516 973
B (Reactive) 1500 600 10 1755 815
16. Fast Producer can take down the Slow
Consumer
Service A Service C
AWS
t2.micro t2.micro t2.micro
X msg/secY msg/sec
If Y < X then Service C can
eventuallycause Service A
to crash