Infobip client API balancer balances your Infobip REST API calls. It gives your service security that it will be able to access Infobip REST API even if one Infobip's data center goes down or there is an ISP routes issue.
Infobip client API balancer balances API calls to multiple data centers seamlessly and without any configuration needed.
- comes preconfigured for your convenience
- works out of the box
- uses the best DC option for your convenience
- automatic retry on any error
- based on proven HAProxy
docker run --name=infobip-client-api-balancer \
-p 7070:7070 \
-p 7443:7443 \
-p 7182:7182 \
-e "ENDPOINTS_AUTHORIZATION=App <API Key>" \
-v /path/to/data/:/tmp/infobip-client-api-balancer/
-d mstipanov/infobip-client-api-balancer:latest
Instead of pointing your app to https://api.infobip.com, point it to http://127.0.0.1:7070
POST settings/1/accounts/_/api-keys HTTP/1.1
Host: api.infobip.com
Authorization: Basic <echo -n 'username:password' | base64>
Content-Type: application/json
Accept: application/json
{
"name": "Client API balancer",
"permissions": [
"/client/v1/balancer"
],
"validTo": "2100-01-01T00:00:00.000+0000"
}
This API Key is restricted only to use with Client Balancer API and has low value as it cen't be used to consume other Infobip services!
More instructions here: Create and manage your API keys
Create your own haproxy.pem and run the docker container like this:
docker run --name=infobip-client-api-balancer \
-p 7070:7070 \
-p 7443:7443 \
-p 7182:7182 \
-e "ENDPOINTS_AUTHORIZATION=App <API Key>" \
-v /path/to/data/:/tmp/infobip-client-api-balancer/
-v /path/to/haproxy.pem:/usr/local/etc/haproxy/cert/haproxy.pem \
-d mstipanov/infobip-client-api-balancer:latest