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

Update Cowboy #13242

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Update Cowboy #13242

merged 1 commit into from
Feb 18, 2025

Conversation

lhoguin
Copy link
Contributor

@lhoguin lhoguin commented Feb 12, 2025

No description provided.

@mergify mergify bot added the make label Feb 12, 2025
@lhoguin lhoguin force-pushed the loic-update-cowboy-2025 branch 2 times, most recently from f40d4e3 to 376355a Compare February 18, 2025 09:56
Cowboy 2.13 contains the Websocket optimisations as well
as the ability to set the Websocket max_frame_size option
dynamically, plus plenty of other improvements.

Cowlib was added as a test dep to rabbitmq_mqtt to make
sure emqtt doesn't pull the wrong Cowlib version for Cowboy.
@lhoguin lhoguin force-pushed the loic-update-cowboy-2025 branch from 376355a to 3e00c84 Compare February 18, 2025 10:15
@lhoguin lhoguin marked this pull request as ready for review February 18, 2025 11:14
@lhoguin lhoguin changed the title DO NOT MERGE Update Cowboy Update Cowboy Feb 18, 2025
@lhoguin
Copy link
Contributor Author

lhoguin commented Feb 18, 2025

The key changes with regard to RabbitMQ are greatly improved Websocket performance, as well as good HTTP performance improvements.

This also includes a way to dynamically set max_frame_size for Websocket which @ansd requested.

https://ninenines.eu/articles/cowboy-2.13.0-performance/
https://ninenines.eu/docs/en/cowboy/2.13/guide/migrating_from_2.12/

@lhoguin lhoguin merged commit 99a09df into main Feb 18, 2025
270 checks passed
@lhoguin lhoguin deleted the loic-update-cowboy-2025 branch February 18, 2025 11:17
@lhoguin lhoguin added this to the 4.1.0 milestone Feb 18, 2025
@lhoguin
Copy link
Contributor Author

lhoguin commented Feb 18, 2025

@Mergifyio backport v4.1.x

Copy link

mergify bot commented Feb 18, 2025

backport v4.1.x

✅ Backports have been created

lhoguin added a commit that referenced this pull request Feb 18, 2025
ansd added a commit that referenced this pull request Feb 18, 2025
Since #13242 updated
Cowlib to v2.14.0, this commit deletes rabbit_uri as written in the
comments of rabbit_uri.erl:
```
This file is a partial copy of
https://github.com/ninenines/cowlib/blob/optimise-urldecode/src/cow_uri.erl
We use this copy because:
1. uri_string:unquote/1 is lax: It doesn't validate that characters that are
   required to be percent encoded are indeed percent encoded. In RabbitMQ,
   we want to enforce that proper percent encoding is done by AMQP clients.
2. uri_string:unquote/1 and cow_uri:urldecode/1 in cowlib v2.13.0 are both
   slow because they allocate a new binary for the common case where no
   character was percent encoded.
When a new cowlib version is released, we should make app rabbit depend on
app cowlib calling cow_uri:urldecode/1 and delete this file (rabbit_uri.erl).
```
@ansd ansd mentioned this pull request Feb 18, 2025
mergify bot pushed a commit that referenced this pull request Feb 18, 2025
Since #13242 updated
Cowlib to v2.14.0, this commit deletes rabbit_uri as written in the
comments of rabbit_uri.erl:
```
This file is a partial copy of
https://github.com/ninenines/cowlib/blob/optimise-urldecode/src/cow_uri.erl
We use this copy because:
1. uri_string:unquote/1 is lax: It doesn't validate that characters that are
   required to be percent encoded are indeed percent encoded. In RabbitMQ,
   we want to enforce that proper percent encoding is done by AMQP clients.
2. uri_string:unquote/1 and cow_uri:urldecode/1 in cowlib v2.13.0 are both
   slow because they allocate a new binary for the common case where no
   character was percent encoded.
When a new cowlib version is released, we should make app rabbit depend on
app cowlib calling cow_uri:urldecode/1 and delete this file (rabbit_uri.erl).
```

(cherry picked from commit 2350299)
ansd added a commit that referenced this pull request Feb 18, 2025
Since #13242 updated
Cowlib to v2.14.0, this commit deletes rabbit_uri as written in the
comments of rabbit_uri.erl:
```
This file is a partial copy of
https://github.com/ninenines/cowlib/blob/optimise-urldecode/src/cow_uri.erl
We use this copy because:
1. uri_string:unquote/1 is lax: It doesn't validate that characters that are
   required to be percent encoded are indeed percent encoded. In RabbitMQ,
   we want to enforce that proper percent encoding is done by AMQP clients.
2. uri_string:unquote/1 and cow_uri:urldecode/1 in cowlib v2.13.0 are both
   slow because they allocate a new binary for the common case where no
   character was percent encoded.
When a new cowlib version is released, we should make app rabbit depend on
app cowlib calling cow_uri:urldecode/1 and delete this file (rabbit_uri.erl).
```

(cherry picked from commit 2350299)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant