Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netty: perf tests #3367

Closed
kciesielski opened this issue Dec 4, 2023 · 1 comment
Closed

Netty: perf tests #3367

kciesielski opened this issue Dec 4, 2023 · 1 comment
Labels
Milestone

Comments

@kciesielski
Copy link
Member

Recently our Netty backends have fully switched to reactive-streams powered processing (see #3337).
Even raw requests and responses are now represented as Subscribers and Publishers, which had to be implemented manually for Future and Loom backends. The implementation is rather naive:

Request Body

  • FileWriterSubscriber requests exactly 1 next chunk after writing current chunk.
  • Similarly for InputStreamBody, where we load data using our SimpleSubscriber before exposing it to the logic as an InputStream.

Response Body

  • FileRangePublisher reads in chunks and manually serializes requests using an AtomicBoolean
  • InputStreamPublisher works similarly, it also uses a repeated blocking {} call to read from an InputStream

We'd like to measure how fast are these implementations, possibly compared to the previous impl (1.9.1) and streaming-based Netty backends like cats and zio, which work in a different way:

  • Publisher from the request is converted into a fs2.Stream or ZStream using library code
  • The obtained stream is then written to a file, also using library code

This issue has been created as a bookmark after noticing that our new backends elements may impact performance. Let's start with specifying what exactly we want to measure and compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants