This article covers the following: |
Overview
Think of Gateway Service as a smart middle layer that connects your product to VWO’s server for running A/B tests, personalizations, and rollouts—but with more control and speed.
VWO’s FME gives you the ability to show different features to different users. But to do this quickly without latency, your app needs some help. That’s where the Gateway Service comes in.
Importance of Gateway Service in FME
Without the Gateway:
Every time your app wants to decide whether to show Feature A or B to a user, it might have to talk to VWO’s cloud servers.
- That takes time.
- And for some SDKs like Go, it just won’t work.
With the Gateway:
- The decision is made inside your system, in milliseconds.
- User data stays secure and private.
- It supports complex targeting, like location-based or browser-based decisions.
- It works even with lightweight SDKs like Go.
When do you need the Gateway Service?
Situation | Why gateway is needed? |
You want to target users based on their location (e.g., US users see Feature X). | Gateway handles geolocation fast and locally. |
You want to target users based on their browser/device (e.g., iPhone users get a special banner). | Gateway reads and uses device info. |
You are using thin SDKs (e.g., Go). | These SDKs depend completely on the Gateway. |
You want to keep user data private and avoid sending info over the internet. | Gateway lives within your system. |
You need a very low response time. | Gateway is fast and internal. |
How does it work?
Here’s a simple explanation of the architecture and flow:
Let’s say a user opens your app:
- Your app asks: “Should I show Feature B to this user?”
- VWO SDK sends this question to the Gateway Service inside your system.
- The Gateway Service decides based on the user’s location, device, or other attributes.
- It responds instantly: “Yes, show Feature B.”
- Only when it is required, the gateway service will talk to VWO server to update rules, flag or campaign settings.
Benefits of Gateway Service
Benefit | Why it matters |
Smarter Targeting | Decide who sees what based on location, browser, or any user property. |
More Security | Data stays inside your system; no constant external calls. |
Faster App or Website | No delay in deciding whether to show a feature. |
Supports All SDKs | Especially useful for Go, Ruby, or thin-client setups. |
Lower Bandwidth Usage | Less internet traffic, since communication happens inside your network. |
Set up Gateway Service
VWO FME Gateway Service is available on the docker hub.
Prerequisites
- Docker and Docker Compose
- VWO Account ID and SDK Key
- [Optional] Add MaxMind credentials for accurate location detection
You have two setup options:
- With a new Redis setup (everything runs together)
- With your existing Redis setup (Gateway connects to your existing Redis server)
Learn how to set up everything in detail here.
Supported Functionalities
There are three main actions the Gateway helps your app do:
-
Get Feature Info (getFlag)
“Is Feature X turned ON for user_123?” -
Track Events (trackEvent)
“User clicked the ‘Buy’ button.” -
Set User Attributes (setAttribute)
“This user is a premium subscriber.”
These are used either automatically via SDKs or manually via API, depending on your setup.
Need more help?
For further assistance or more information, contact VWO Support.