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

TCP_NODELAY landed in php 7.1 #41

Closed
mente opened this issue Nov 27, 2016 · 5 comments
Closed

TCP_NODELAY landed in php 7.1 #41

mente opened this issue Nov 27, 2016 · 5 comments

Comments

@mente
Copy link
Contributor

mente commented Nov 27, 2016

Being curious i've written a benchmark comparing php-amqplib vs amqp extension vs bunny.

The winner was amqp extension with socket connection being a bit behind, then bunny, then stream connection. Apparently such amazing results of socket connection in php-amqplib were due to using TCP_NODELAY. Digging further into stream connection looks like the same has landed for stream connections in 7.1.

Would be nice if you could add TCP_NODELAY to greatly improve performance of 1st message send/consume

@jakubkulhan
Copy link
Owner

Setting tcp_nodelay option when creating Bunny\Client (or Bunny\Async\Client) should set this option on underlying socket - https://github.com/jakubkulhan/bunny/blob/master/src/Bunny/AbstractClient.php#L245-L248

@mente
Copy link
Contributor Author

mente commented Nov 28, 2016

That's awesome. Where can I find a list of all available options?

@mente
Copy link
Contributor Author

mente commented Nov 28, 2016

E.g. I see persistent option that requires path. What is it? Is it same as vhost?

@jakubkulhan
Copy link
Owner

Unfortunately, docs for Bunny are mostly missing. persistent connections are PHP feature - http://php.net/manual/en/function.stream-socket-client.php#105393 when you could reuse single TCP connection shared among multiple requests. It doesn't make sense implemented like this for AMQP, I really don't know, why I implemented this option at all 😇

@mente
Copy link
Contributor Author

mente commented Nov 28, 2016

Hm, is bunny actively maintained? Would be nice to have documentation (your cap)

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

No branches or pull requests

2 participants