How to Run Multiple Instances of OverSIP
OverSIP runs in a single core. In certain scenarios (i.e. when acting as an Outbound Edge Proxy) it maybe useful to run multiple instances of OverSIP by sharing the same configuration files (so multiple cores are used). Note however that, unless you provide some mechanism for sharing memory, all those OverSIP instances will be independent.
BTW: OverSIP single thread architecture based on the “Reactor Design Pattern” is really efficient and fast, are you sure you need more?
To run multiple instances of OverSIP in the same host the following steps must be done:
Debian and Ubuntu
- Copy the main configuration file
/etc/oversip/oversip.conf
asoversip1.conf
,oversip2.conf
, etc. Modify the port values in those files so different instances of OverSIP won’t attempt to bind in the same port (it would make OverSIP to fail). - Copy the default file
/etc/default/oversip
asoversip1
,oversip2
, etc. Modify theCONFIG_FILE
variable and set it tooversip1.conf
,oversip2.conf
, etc. - Copy the init script
/etc/init.d/oversip
asoversip1
,oversip2
, etc. Modify theNAME
variable in those scripts by setting it tooversip1
,oversip2
, etc.- The
NAME
variable makes the init script to look for a default file/etc/default/$NAME
and for a PID file/var/run/oversip/$NAME
.
- The
- Add the new init scripts to the system runleves:
update-rc.d oversip1 defaults update-rc.d oversip2 defaults ...
And that’s all. Now you have multiple OverSIP instances, each one with its own init script but sharing the configuration files under /etc/oversip/
directory (all but the main configuration file oversipN.conf
).