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

Channel max part2 #945

Merged
merged 3 commits into from
Feb 13, 2025
Merged

Channel max part2 #945

merged 3 commits into from
Feb 13, 2025

Conversation

baelter
Copy link
Member

@baelter baelter commented Feb 12, 2025

WHAT is this pull request doing?

Was i little trigger happy with the prio PR....

  • Improving channel_max specs
  • Actually implementing channel_max 0 = unlimited

Question: How do we handle the "hard" limit of UInt16::MAX?
Should we communicate that? Or have it as a "hidden" limit?

HOW can this pull request be tested?

Specs

@baelter baelter requested a review from a team as a code owner February 12, 2025 19:05
@spuun
Copy link
Member

spuun commented Feb 13, 2025

Question: How do we handle the "hard" limit of UInt16::MAX?
Should we communicate that? Or have it as a "hidden" limit?

It's probably insane to open more than (or even close to) UInt16::MAX, but the spec allows it. I guess it would be good to support real unlimited.

@baelter
Copy link
Member Author

baelter commented Feb 13, 2025

real unlimited

Well, that is not possible. There is a limit to how many electrons there are in the universe. Or maybe not. But a limit to how many we have access to :)

Copy link
Member

@spuun spuun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With channel_max = 0 in config:

# lavinmqperf connection-count -x 1 -c 100000 --uri 'amqp://guest:guest@localhost/%2F?channel_max=0' 
Unhandled exception in spawn: channel_max reached (Exception)

@baelter
Copy link
Member Author

baelter commented Feb 13, 2025

channel_max reached

UInt16::MAX = 65535 so it's expected. And that error is coming from amqp-client, but if it would not lavinmq would also stop at 65535 and close the connection.

Do we want channel ids to be UInt32 instead?

@baelter
Copy link
Member Author

baelter commented Feb 13, 2025

Actually 0 is not "unlimited" it's

Zero indicates no specified limit.

And channel ids are short i.e uint16 per definition. So theoretical max is 65535. In RabbitMQ as well.

@spuun
Copy link
Member

spuun commented Feb 13, 2025

channel_max reached

UInt16::MAX = 65535 so it's expected. And that error is coming from amqp-client, but if it would not lavinmq would also stop at 65535 and close the connection.

Do we want channel ids to be UInt32 instead?

I was confused by the commit message Implement channel_max 0 = unlimited. But "unlimited" can't exist since channel id is a "short" (uint16), so unlimited means UInt16::MAX.

@spuun
Copy link
Member

spuun commented Feb 13, 2025

Actually 0 is not "unlimited" it's

Zero indicates no specified limit.

And channel ids are short i.e uint16 per definition. So theoretical max is 65535. In RabbitMQ as well.

Oh, didn't update before i wrote my last comment! 👍

@spuun spuun self-requested a review February 13, 2025 13:51
@baelter baelter merged commit 66a48f7 into main Feb 13, 2025
23 of 25 checks passed
@baelter baelter deleted the channel_max_part2 branch February 13, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants