use of org.mobicents.tools.sip.balancer.BalancerRunner in project load-balancer by RestComm.
the class ChunkResponseTest method initialization.
@BeforeClass
public static void initialization() {
server = new HttpServer(8080, 4444, 2222);
server.setChunkedresponse(true);
server.start();
balancerRunner = new BalancerRunner();
LoadBalancerConfiguration lbConfig = new LoadBalancerConfiguration();
lbConfig.getSipConfiguration().getInternalLegConfiguration().setTcpPort(5065);
lbConfig.getSipConfiguration().getExternalLegConfiguration().setTcpPort(5060);
balancerRunner.start(lbConfig);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
use of org.mobicents.tools.sip.balancer.BalancerRunner in project load-balancer by RestComm.
the class HttpRedirectionTest method initialization.
@BeforeClass
public static void initialization() {
balancerRunner = new BalancerRunner();
LoadBalancerConfiguration lbConfig = new LoadBalancerConfiguration();
lbConfig.getSipConfiguration().getInternalLegConfiguration().setTcpPort(5065);
lbConfig.getSipConfiguration().getExternalLegConfiguration().setTcpPort(5060);
lbConfig.getHttpConfiguration().setHttpsPort(2081);
lbConfig.getSslConfiguration().setKeyStore(HttpsBalancerWithHttpsServerTest.class.getClassLoader().getResource("keystore").getFile());
lbConfig.getSslConfiguration().setKeyStorePassword("123456");
lbConfig.getSslConfiguration().setTrustStore(HttpsBalancerWithHttpsServerTest.class.getClassLoader().getResource("keystore").getFile());
lbConfig.getSslConfiguration().setTrustStorePassword("123456");
balancerRunner.start(lbConfig);
serverArray = new HttpServer[numberNodes];
for (int i = 0; i < numberNodes; i++) {
serverArray[i] = new HttpServer(7080 + i, 4444 + i, 2222 + i);
serverArray[i].start();
Helper.sleep(1000);
}
Helper.sleep(5000);
}
use of org.mobicents.tools.sip.balancer.BalancerRunner in project load-balancer by RestComm.
the class HttpStatisticTest method initialization.
@BeforeClass
public static void initialization() {
balancerRunner = new BalancerRunner();
LoadBalancerConfiguration lbConfig = new LoadBalancerConfiguration();
lbConfig.getSipConfiguration().getInternalLegConfiguration().setUdpPort(5065);
balancerRunner.start(lbConfig);
serverArray = new HttpServer[numberNodes];
for (int i = 0; i < numberNodes; i++) {
serverArray[i] = new HttpServer(7080 + i, 4444 + i, 2222 + i);
serverArray[i].start();
Helper.sleep(1000);
}
Helper.sleep(5000);
}
use of org.mobicents.tools.sip.balancer.BalancerRunner in project load-balancer by RestComm.
the class HttpsBalancerWithHttpServerTest method initialization.
@BeforeClass
public static void initialization() {
balancerRunner = new BalancerRunner();
LoadBalancerConfiguration lbConfig = new LoadBalancerConfiguration();
lbConfig.getSipConfiguration().getInternalLegConfiguration().setUdpPort(5065);
lbConfig.getHttpConfiguration().setHttpsPort(2085);
lbConfig.getSslConfiguration().setKeyStore(HttpsBalancerWithHttpsServerTest.class.getClassLoader().getResource("keystore").getFile());
lbConfig.getSslConfiguration().setKeyStorePassword("123456");
lbConfig.getSslConfiguration().setTrustStore(HttpsBalancerWithHttpsServerTest.class.getClassLoader().getResource("keystore").getFile());
lbConfig.getSslConfiguration().setTrustStorePassword("123456");
lbConfig.getSslConfiguration().setTerminateTLSTraffic(true);
lbConfig.getSslConfiguration().setTlsClientProtocols("TLSv1,TLSv1.1,TLSv1.2");
lbConfig.getSslConfiguration().setEnabledCipherSuites("TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
balancerRunner.start(lbConfig);
serverArray = new HttpServer[numberNodes];
for (int i = 0; i < serverArray.length; i++) {
serverArray[i] = new HttpServer(7080 + i, 4444 + i, 2222 + i);
serverArray[i].start();
Helper.sleep(1000);
}
Helper.sleep(5000);
}
use of org.mobicents.tools.sip.balancer.BalancerRunner in project load-balancer by RestComm.
the class NodeGracefulShutdownRmiTest method setUp.
@Before
public void setUp() throws Exception {
shootist1 = new Shootist(ListeningPoint.TCP, 5060, 5033);
shootist2 = new Shootist(ListeningPoint.TCP, 5060, 5034);
balancer = new BalancerRunner();
LoadBalancerConfiguration lbConfig = new LoadBalancerConfiguration();
lbConfig.getSipConfiguration().getExternalLegConfiguration().setUdpPort(5060);
lbConfig.getSipConfiguration().getInternalLegConfiguration().setTcpPort(5065);
lbConfig.getSipConfiguration().getAlgorithmConfiguration().setAlgorithmClass(UserBasedAlgorithm.class.getCanonicalName());
lbConfig.getSipConfiguration().getAlgorithmConfiguration().setSipHeaderAffinityKey("To");
HeartbeatConfig heartbeatConfig = new HeartbeatConfigRmi();
lbConfig.setHeartbeatConfiguration(heartbeatConfig);
balancer.start(lbConfig);
for (int q = 0; q < servers.length; q++) {
servers[q] = new AppServerWithRmi("node" + q, 4060 + q, "127.0.0.1", 2000, 5060, 5065, "0", ListeningPoint.TCP);
servers[q].start();
}
Thread.sleep(2000);
}
Aggregations