Reputation: 623
My application has to send a lot of http requests to the same server. It may be 20 or more requests which responses should be handled as quickly as possible. In this case I want to reuse already instantiated by first request TCP connection for all next requests cause it should dramatically improve performance. While researching the topic I've found out that OkHttp has ConnectionPool where it stores reusable connections. It's led me to the question does OkHttp reuse HTTP1/1 connections or only HTTP2 and SPDY? How OkHttp api user can change this behavior?
Upvotes: 9
Views: 4159