[Asterisk-Dev] Re: PostgreSQL support in Asterisk 1.2?
Michael Giagnocavo
mgg-digium at atrevido.net
Sat Aug 6 11:18:50 MST 2005
>> But a lot of others wont. They told me time after time to
>> put all in a database so you can manage it with a webapp and
>> when done, regenerate the flat files and signal asterisk to
>> reload. Now this may work with only 1 or 2 ppl changing
>> dialplan, but imagine a server with around 300+ customers
>> all wanting to reload asterisk over and over again, because
>> they are setting up IVR's or holiday dialplans.
>> That's what realtime can solve.
>> And if RT could use postgres.....
>
>RT Can use postgres with ODBC, IIRC.
>
>And again we're hitting the exact scenario I'm saying that MySQL can't
>handle
>nicely -- dozens (in your case 300+) of concurrent connections all hitting
>the same set of tables.
>
>You can do this without tying the DB to the PBX. Use the DB to create the
>static files and every 5 to 15 minutes do an extensions reload or whatever
>reload (iax2, sip, whatever) to reload the parts that changed. It's
>trivial,
>it's FAR more robust, and you can use whatever the hell DB and integration
>system you want WITHOUT screwing with the PBX!
Yep. That's what we did when designing a small app for Asterisk. We had a
config parsing library (~500 LoC, for a nice, full, object model) to edit
the config files. All reloads came through a main webservice. The webservice
would queue up requests, so if N requests came through in X seconds, there'd
only be one reload.
With a bit of optimizations to Asterisk's loading code (remove the checks
for redundant peers, an N*N operation), you can load 100K peers in ~2
seconds (on a single proc Celeron, ~2.4Ghz). Anyone complaining about 300
users and flat file performance hasn't done much work to optimize things.
Even the overhead of SOAP is trivial. The *real* issue that we ran into was
just Asterisk's core performance. Ask anyone with, say, 1000 IAX2 peers
trying to register. IMO, in order to start having, say, 100/updates a second
(where config perf might be an issue), you're going to need many more than
1000 peers.
-Michael
More information about the asterisk-dev
mailing list