[Freeswitch-users] Central FreeSWITCH nodes management with Mod_XML_Curl vs Mod_Lua

Gabriel Gunderson gabe at gundy.org
Wed Jul 18 02:40:41 MSD 2012

Comments inline:

On Tue, Jul 17, 2012 at 10:33 AM, Eugene Azuka <eugeneazuka at gmail.com> wrote:
> " The thing I don't like about mod_xml_curl is that to scale it you have to
> scale the web server with more listeners. If you run out of listeners your
> ability to answer new calls fails. If the web server crashes your ability to
> handle calls is gone.

Scaling web servers is an easy, well known and a common problem to
solve. Yes, you have to make sure you have the resources, but this it
true of any technology out there.

> Instead, I use Lua which is embedded into FreeSWITCH as the XML handler. The
> Lua reads the info from the database and hands it off to FreeSWITCH. This
> approach is not dependent on a service that can fail, or that can run out of
> listeners. "

This is a great approach, but I don't think the logic is sound. Lua
(if it's doing anything fancy) will run out of resources that it
depends on -- memory, database connections, sockets etc.

If one accepts that they'll have to build out to *really* scale
something, they'll also come to appreciate the fact that they can move
the HTTP stack to another box when needed (or 50 other boxen if
required).  The Lua (or any other embedded language) is pretty well
tied to that same box.

In the end, it probably doesn't matter. If you end up scaling to the
ends of the Earth, you'll have to rewrite it anyway. Just give thanks
that you've found FreeSWITCH and it was flexible enough to give you
the amazing configurability needed to build it in anyway you like :)

> What do you experts think about this comment above?

There are experts on this list now?! Awesome ;)

> Wouldn't Lua reading directly from database still face some of the issues i
> may be running from using mod_xml_curl, like database crashing, slow reading
> from database?

Yep, see above.

> Unlike using mod_xml_curl whereby i can optimise my code to make use of
> memcached or radis to reduce some calls to database, can i still do such
> with mod_lua?

If you want and Lua supports it.

> So what do experts think, should i go with Mod_Lua approach just as he said
> above or should i continue with using Mod_XML_Curl?

Your choice! Happy hacking!


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list