I'm working on an application that uses a custom solution for pubsub,
and currently evaluating switching to autobahn. So far I've been quite
happy with the autobahn API and its ease of use. One concern I have is
Thanks! Thats good to hear. Shameless self-promo: getting an API right, that is both easy to use while still flexible is much more complicated that writing the implementation.
how autobahn's performance characteristics change as the number of
pubsub topics grows.
For example, each pubsub client in our application subscribes to at
least 100 different topics and a few clients regularly publish on a
handful of them (that number could easily grow to 500 and beyond). I'm
worried that the amount of computation required for autobahn to publish
a particular message will drastically increase as the number of topics
and clients both increase, leading to performance degradation.
Have there been any tests that measure autobahn's performance with large
numbers of topics and clients? Alternatively, could anyone comment on
We have tested a single AutobahnPython instance running on a 2 core 4GB VM with 180k concurrently active connections. A little OS tuning was needed (we used FreeBSD/kqueue, but Linux/epoll should be fine also) to allow for such large numbers of open TCPs, but otherwise, it's pretty straightforward.
the internal implementation for routing pubsub messages? For example,
assume there are *n *subscribers, *t* topics, and that each subscriber
subscribes to each topic. Suppose a message gets published on a
particular topic. Ideally the time complexity of sending this message to
all clients would be O(n), but I could imagine a situation where it
takes O(n * t) or worse, depending on how efficient the routing
It's good that you care about such things .. since usually that's the kind of stuff that might come back biting.
However, rest assured, Autobahn has very efficient event dispatching.
The dispatching in the standard case will basically incur a O(1) lookup in a dict (hash access) for the subscribers of the given topic, and then an iteration over those: O(n), where n is the subscriber count for _that_ topic.
Moreso: Autobahn will serialize and WS frame the event to be dispatched only _once_, and then just push the buffered octets onto each TCP connection that leads to an receiver.
You can look for yourself - follow the code from:
Hope this helps,
Am 17.10.2013 04:43, schrieb Nick Fishman:
Thanks in advance,
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.