router
router copied to clipboard
hyper 1.0 update
The new version of hyper is coming soon (we are already at 1.0.0-rc.4), so we should plan around it. Right now I have no idea about the impact or size of this task so I'll explore a bit. One thing that is known already, is that the connection pool was removed, which should help for https://github.com/apollographql/router/issues/2063, but requires that we integrate a new connection pool.
TODO:
- [ ] test the update to hyper 1.0.0-rc.4
We will also have to upgrade axum and tower-http. Both are, for now, not already migrated to the new hyper
Some details about this upgrade:
- the HTTP client we used has moved to the hyper-util crate. To make the upgrade smoother, we can start using that crate, then in a follow up check if we want to keep it
hyper::Bodydoes not exist anymore, there's now aBodytrait that all body types must implement- there are some
Bodyimplementations in the hyper-body-util crate, but none with the same API as the oldBodytype - before attempting the upgrade, we should probably make our own HTTP body type, to use in RouterService and HttpClientService, and replace all uses of hyper::Body with it. Then we will be able to upgrade the hyper body in one place