[nanomsg] Re: Trying to implement "directory" pattern

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: Paul Colomiets <paul@xxxxxxxxxxxxxx>
  • Date: Tue, 26 Feb 2013 10:28:45 +0100

On 2013-02-26 09:49, Paul Colomiets wrote:
Hi Martin,


On Mon, Feb 25, 2013 at 11:48 PM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:

On 25/02/13 21:55, Paul Colomiets wrote:

You caught me, I don't use subscriptions at all :) I always subscribe on
empty string.

I've never seen it used either. It would be nice if someone with a real use case could explain it.


Do you have an idea what should subscription forwarding should do in case
of TCP pushback?


At the moment I don't see any other solutions, except buffering, and if
connection does no progress for some time, drop it.

The problem with that is auto-reconnect. Subscriber sends a lot of subscriptions, more that the producer is able to accept. It is not processing them, so TCP pushback happens. Subscriber sees that the subscription stream is stuck and disconnects the peer. The producer tries to reconnect and immediately gets hit by a subscription storm. As so on ad infinitum.

Note that this only happens when it is publisher who connects. Which is the scenario with multiple publishers that's currently disabled in PUB/SUB protocol.

Martin


Other related posts: