Hi,
I've been debugging issues in our project, where malamute's memory usage
increases due to undelivered mailbox messages. The mailbox/size-limit
config option helps in some cases, but it does not cover everything.
E.g., we have client connections that are ephemeral -- they connect with
a randomly generated address, send a request to some other client's
mailbox and either receive a response or disconnect after a timeout. The
result is that if the system is under higher load, malamute ends up with
bunch of queues holding one message each. Another issue is that it's
difficult to debug such cases, because the mailbox engine is rather
silent. Would you guys take patches that
A) add some "soft" limit for the queue size to log a warning when the
mailbox grows too much? I'm thinking of something like
mlm_server
mailbox
size-limit = 524288
size-limit-warn = 262144
B) add an aging mechanism for messages? The idea is that a message
undelivered for a long period of time can a sign of a problem, either
on the sender or the receiver. In fact, in our use case, all the
clients are supposed to be connected, so actually any queued message
is an anomaly.
C) implement some special handling of ephemeral clients, so that
messages directed to them are either delivered directly or dropped.
Now the problem is that if the clients are to advertise their
ephemeral nature, malamute would have to keep track of past clients,
so the memory usage would just accumulate elsewhere :). How about
keying this off the client address somehow, e.g. via a configurable
regex:
mlm_server
mailbox
no-queue-pattern = ^temp\..*
and the clients would set their address to "temp.XXXXXX".
The above also applies to service queues to some extent, we just do not
use this model in our project. What do you think?
Thanks,
Michal
--
Michal Marek Eaton European Innovation Center
Open Source Developer Bořivojova 2380
42ity.org 252 63 Roztoky
Tel: +420 211 151 532 www.eaton.cz
-----------------------------
Eaton Elektrotechnika s.r.o. ~ Sídlo společnosti, jak je zapsáno v rejstříku:
Komárovská 2406, Praha 9 - Horní Počernice, 193 00, Česká Republika ~ Jméno,
místo, kde byla společnost zaregistrována: Praha ~ Identifikační číslo (IČO):
498 11 894
-----------------------------
_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev