nvisibleinc / go-ari-proxy

Asterisk REST Interface proxy system written in Go
Apache License 2.0
31 stars 17 forks source link

Is this proxy capable of handling multiple Asterisk instances at the same time ? #29

Closed faressoft closed 7 years ago

faressoft commented 7 years ago

Is this proxy capable of handling multiple Asterisk instances at the same time ?

danjenkins commented 7 years ago

No, you run one proxy instance per Asterisk

faressoft commented 7 years ago

So do you have any recommended suggestions about handling that ? Is there any projects or approaches to take care of scaling the asterisk part.

danjenkins commented 7 years ago

@faressoft you run this on each Asterisk host, and this proxy then connects to a NATS message bus (or AMQP) and you send the messages to your end application through the message bus (you can then use a library that understands the proxy message such as the go-ari-library or the .net lib)

Check out https://github.com/nvisibleinc/go-ari-proxy#application-topic

faressoft commented 7 years ago

@danjenkins Great, so what is the reason to do that, comparing to just connecting to the asterisk's WebSocket directly from my application ? I know that asterisk has a limitation of the connected applications to just one on the socket. Do you mean that with the proxy approach I can subscribe to the messages by running multiple instances of my applications (Scaling on the level of the end user application) (Publish/Subscribe pattern) ?

danjenkins commented 7 years ago

yeah so you can have multiple asterisks (each with their own proxy instance) and then those all connect to a message bus, and then your application can have one or many of your application - now your application(s) can receive calls from any of the Asterisks, not just one

Check out my talk from Astricon to help explain things :) http://www.slideshare.net/danjenkins/astricon-2016-scaling-ari-and-production-66568148

faressoft commented 7 years ago

This is really great slides, thanks a lot for your efforts.