[ejabberd] How does ejabberd high number of requests

Gaurav Jain monkeyfdude at gmail.com
Fri Feb 27 19:57:16 MSK 2015

Hi Mickael,

I have read thru lots of erlang books and docs. I think I understand Erlang
LWP. Let me ask a very specific quesiton, if you could please answer for me.

* Lets take mod_offline.erl for eg.
* Sinces its configured in modules section of ejabberd.yml, it gets loaded.
* Then ejabbard supervisor will start the mod_offline supervisor.
* Then mod_offlline supervisor will start the worker Erlang process
* Then worker will start listening to message.

* Since, Ejabbard uses gen_server behavior, when a offline message comes,
it will call handle_info(Msg, State) on all the configured hooks.
* That means mod_offline will get called with handle_info.
* mod_offline will store the message and will go back to listening more
offline messages.

If I understand above correctly, then what I dont undertsand is what will
happen if 10 offline_messages come right at the same time.

Could you please just tell me what will change in the above sequence when
10 messages come at once??

Best Regars,
Gaurav Jain

On Fri, Feb 27, 2015 at 8:39 AM, Mickaël Rémond <mremond at process-one.net>

> Hello,
> On 27 Feb 2015, monkeyfdude at gmail.com wrote:
> > I was also curious what needs to be done to write a custom module to
> > be able to handle high number of requests simultaneously.
> >
> > Could you please provide some pointers?
> >
> > I am very new to erlang and ejabberd. Please help me understand how
> > does ejabberd take care of high requests.
> This question is heavily dependant on Erlang knowledge and I think to
> get started, you should have a look at how Erlang lightweight processes
> work. This is the basis to Erlang concurrency.
> Best regards,
> --
> Mickaël Rémond
>  http://www.process-one.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20150227/fa210921/attachment.html>

More information about the ejabberd mailing list