A lot of Unleash users wants to use feature toggles in their native mobile apps and single-page apps though. To meet this need we have helped multiple clients to established a Unleash-Proxy to support this need. 

The Unleash-Proxy use the official Unleash SDK to integrate with Unleash and has a simple API and will be super-fast, as it has all the data available in memory. It will also implement client specific strategies and exposes all feature toggles in the context of a specific User. 

The Unleash-Proxy uses the Unleash SDK and exposes a simple API. The Proxy will synchronise with the Unleash API in the background and provide a simple HTTP API for clients.

The Unleash-Proxy API

The Unleash-Proxy has a very simple API. It takes the Unleash Context as input and will return the feature toggles relevant for that specific context. 

Client - unleash-proxy illustration
Example of the communication.

How to connect to the Proxy?

The Unleash Proxy takes the heavy lifting of evaluating toggles and only returns enabled toggles and their values to the client. This means that you would get away with a simple http-client in many common use-cases.

However in some settings you would like a bit more logic around it to make it as fast as possible, and keep up to date with changes.

For single-page apps we have a tiny proxy-client in JavaScript, without any external dependencies, except from browser APIs. This client will store toggles relevant for the current user in localstorage and synchronise with the Unleash Proxy in the background. This means we can bootstrap the toggles for a specific use the next time the user visits the web-page.

We are working on providing similar native clients for Android and iOS. If you are interested please react out to learn more.

Can I host the proxy my-self?

We are in a limited beta with selected customers to allow self-hosting of the unleash-proxy. This is especially important if you want to use unleash together with serverless functions such as AWS Lambda. If you are interested in this please let us know.