wyri,
@wyri@haxim.us avatar

laughs in

Took a couple of weeks but it's reliably running locally on my laptop. At higher throughput than some years ago on dedicated hardware, before the refactoring 😎 .

Bunny consuming 60K messages a second from a local RabbitMQ server

wyri,
@wyri@haxim.us avatar

laughs ever harder in

Happy with how this refactor of Bunny fully relying on @reactphp is working out. I got a bit of a scare earlier tonight when I found a significant performance loss (33.333% to 50%) but managed to quickly fix that and now it's on par. (We're talking 2 seconds of difference on 6 - 8 minute benchmark runs.)

Managed to break 100K messages a second both ways, really happy and proud of this 😎!

Publishing 91.742 messages a second

merms,

@wyri Thanks for all the work you do for the project! At work, we had a love/hate relationship with Bunny for quite some time (we switched to a Postgres-based queue recently), and we’re super grateful for the effort that was put into maintaining it.

Quick question:

> fully relying on @reactphp

This means event loop, so no “sync” version?

E: That made no sense. Guess the real question is: Will it need a specific PHP extension to work?

wyri,
@wyri@haxim.us avatar

@merms What was the hate part of that relationship?

Behind the scenes, it has used the event loop for ages now. But did its connection handling manually. Took out the custom connection handled and now using react/socket to create the connections and such.

So no, you don't need a specific extension to work. As always please use ext-ev or ext-uv, or another event loop extension with @reactphp in production because it boosts your performance a lot. Plus drops the 1024 filedescriptor limit.

merms,

@wyri Sorry for the late reply, we had a case of kids++. 👶

Also I really struggle with a good answer. 😅

Our biggest issue was disconnecting the Bunny client in tests. See e.g. here: https://github.com/jakubkulhan/bunny/issues/93 I ended up keeping a global list of references (the & stuff) to all Bunny instances so that I could trigger their destructors by setting them to =null and calling garbage collection.

We also had some TTL/disconnection issues b/c long-running consumer jobs blocked the main loop.

merms,

@wyri The last point is why I asked about the event loop in the first place, but I can’t recall the specifics from when I tried to figure this out.

> Behind the scenes, [the sync client] has used the event loop for ages now.

It’s own version of an “event loop”? At least that’s how I understand the code:

https://github.com/jakubkulhan/bunny/blob/v0.5.5/src/Bunny/Client.php#L185

(I might be completely wrong here.)

That’s why I’ve always felt that the sync client was an afterthought of the async client and doesn’t really fit the interface.

merms,

@wyri Consumer callbacks causing the client to run into TTL disconnects because the execution path of heartbeat messages is blocked. Stuff like that.

Edit: Ah, yes, the last part of this comment might describe a bug in the sync client:

https://github.com/jakubkulhan/bunny/issues/93#issuecomment-630814927

For some reason, I wasn’t able to figure out a MR with a fix or something like that.

merms,

@wyri (There should also be a 1.0 release at some point, I guess. But that might be just me. 😅 I think Bunny is heavily used in production, and SemVer says that 0.* interfaces are allowed to change at any time.)

wyri,
@wyri@haxim.us avatar

@merms No need to apologise for prioritising your newborn over replying. Congratulations 🎉 ! And yes there should be a 1.0 release. Doing the merging of both clients is a bit box to tick off for that.

And yes you're right, it had its own event loop in the sync client. Kinda forgot about that after yanking it out 😅 .

To bad you can't help me test 0.6 before tagging it outside my own set up for it. But thanks for the context on it.

codemonkeymike,

@wyri ohh what's the project

wyri,
@wyri@haxim.us avatar

@codemonkeymike https://github.com/jakubkulhan/bunny Been working on a rework of internals.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • DreamBathrooms
  • InstantRegret
  • tacticalgear
  • magazineikmin
  • ethstaker
  • rosin
  • everett
  • Youngstown
  • khanakhh
  • slotface
  • ngwrru68w68
  • kavyap
  • Leos
  • thenastyranch
  • JUstTest
  • mdbf
  • GTA5RPClips
  • cubers
  • cisconetworking
  • Durango
  • tester
  • provamag3
  • osvaldo12
  • modclub
  • anitta
  • megavids
  • normalnudes
  • lostlight
  • All magazines