Installing Hackle Proxy
In the case where a Hackle Proxy is required because the specific SDK is not provided for your language, think of the Proxy as a server or mediator between the PHP SDK and Hackle. In other words, the experimentation, set-up configuration and tracking event actions carried out by the original SDK (for other languages) will be carried out by the API located in the Hackle Proxy.
If you are using Docker:
Docker is an open platform that allows you to develop, ship, and run applications. The Docker will help install the Hackle Proxy.
If Docker is not installed, refer to the Installing Docker document and proceed with the following steps after installing Docker.
1. Run the Docker Independently
1.1 Download the Docker Image
Download the Hackle Proxy image using the command below.
docker pull hackle/proxy
1.2 Run the Hackle Proxy
You can run the Hackle Proxy with the command below.
docker run -d \
-e SDK_KEYS=YOUR_SDK_KEY \
-p 8888:8888 \
--name hackle-proxy \
hackle/proxy
Configure your Hackle Proxy by specifying the SDK key for the desired environment of your experiment, which can be found on the dashboard. You can find more information on the SDK key through the Keys Used by SDK Functions document.
Up to 4 SDK Keys can be entered using the “,”delimiter.
1.3 Verify installation
curl http://localhost:8888/hello
2 Use Docker-Compose
2.1 Script writing
If you are using Docker-Compose, you can write and run docker-compose.yml as shown below.
version: '3.1'
services:
hackle-proxy:
image: hackle/proxy
ports:
- 8888:8888
environment:
SDK_KEYS: YOUR_SDK_KEY
Run the Hackle Proxy by specifying the SDK Key. You can find the SDK key through the Keys Used by SDK Functions documentation.
Up to 4 SDK Keys can be entered using the “,”delimiter.
2.2 Execution
docker-compose up -d
3. Other
3.1 Minimum requirements
Proxy is implemented to run in lower specifications. However, for performance reasons, we recommend a minimum requirement of the following specifications.
- Cpu : 1 core
- Memory : 1GB
4. Troubleshooting
library initialization failed - unable to allocate file descriptor table - out of memory
If the above problem occurs when running the Docker, please add the option below.
--ulimit nofile=1024:1024
If you are not using the Docker
A proxy that can be used without installing Docker is currently being prepared. Please look out for more updates!
However, at this point in time, you should install the Docker to use our proxy. Please refer to the Installing Docker documentation.
Updated 3 months ago