Julien Viet
Open source developer for 15+ years
Current @vertx_project lead
Principal software engineer at
Marseille Java User Group Leader
https://www.julienviet.com/
http://github.com/vietj
@julienviet
https://www.mixcloud.com/cooperdbi/
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
No content
Slide 5
Slide 5 text
Page Load Time as bandwidth increases
1000
1550
2100
2650
3200
1Mbps 2Mbps 2Mbps 4Mbps 5Mbps 6Mbps 7Mbps 8Mbps 9Mbps10Mbps
Page Load Time as latency decrease
1000
1750
2500
3250
4000
200 ms 180 ms 160 ms 140 ms 120 ms 100 ms 80 ms 60 ms 40 ms 20 ms
Slide 6
Slide 6 text
Web performance state of the art
Slide 7
Slide 7 text
Persistent connections
Slide 8
Slide 8 text
Multiple connections
Slide 9
Slide 9 text
Domain sharding
Slide 10
Slide 10 text
Content Delivery Networks
Slide 11
Slide 11 text
Caching
Slide 12
Slide 12 text
Compression and minification
Slide 13
Slide 13 text
Still a bottleneck!
GET
OK
GET
OK
Slide 14
Slide 14 text
HTTP/2
A better TCP transport for HTTP request and responses
Same HTTP semantics
RFC7540 : Hypertext Protocol version 2
RFC7541 : Header Compression for HTTP/2
Slide 15
Slide 15 text
HTTP/2
H2
TLS/SSL
Mandatory for browsers
ALPN extension to negotiate HTTP/1 or HTTP/2
H2C
Clear text
Via HTTP/1 upgrade or directly
Slide 16
Slide 16 text
HTTP/2 framed protocol
Defines a set of frames encoded in binary on a single
connection
Settings
Headers
Data
Flow control
Push, Priority, Ping
Reset
Slide 17
Slide 17 text
Settings frames
First frame exchanged by client and server
Max concurrency
Max frame size
etc…
Eclipse Vert.x
Open source project started in 2012
Created by Tim Fox
Eclipse / Apache licensing
A toolkit for building reactive applications for the JVM
7K ⋆ on
Built on top of
https://vertx.io
@vertx_project
Slide 40
Slide 40 text
Vert.x
Latest and greatest Vert.x 3.4.2
Scala and Kotlin support
RxJava improvements
MQTT server
Kafka client
gRPC support
Web client
Infinispan cluster manager
and much more!
Non-blocking IO benefits
✓ Handle many connections with a few threads
- focus on protocol concurrency
- minimize system calls
- more efficient for pipelined/multiplexed protocols
✓ Get away from thread pools
- removes unnecessary bottlenecks
- easier capacity planning
- focus on protocol concurrency
✓ Gracefully handle slow connection
- remain responsive
- don’t impact other connections
Slide 49
Slide 49 text
Thread pool concurrency
Backend
Event Loop
HTTP/2 connection
Slide 50
Slide 50 text
performed (req / sec)
0
1250
2500
3750
5000
planned (req / sec)
0 1000 2000 3000 4000 5000
HTTP/2 thread pool HTTP/2 non blocking
Building Reactive Microservices in Java
https://developers.redhat.com/promotions/building-reactive-microservices-in-java/
Slide 56
Slide 56 text
TL;DR;
Unleash concurrency with HTTP/2 and gRPC
Non blocking is a key factor for high concurrency
Vert.x is a great fit for HTTP/2
Reactive ecosystem
Easy to scale