Architecture
The overall Flipt server architecture is shown in this diagram
The Flipt application is made up of three main components:
- Flipt Backend Service
- Flipt REST API
- Flipt Web UI
All three of these components run side by side in a single binary. The UI and
REST API are served on the same port (8080
by default) and the GRPC Backend
Service is served on 9000
by default.
Backend
The Flipt Backend service is the main entry point to the application and implements all of the business logic for Flipt. This is what users of the gRPC client SDKs will communicate with, allowing for fast, efficient communication with your applications.
REST API
The Flipt REST API is implemented on top of the Backend Service using gRPC Gateway (described below).
The REST API is served under /api/v1
and allows all actions that the client
SDKs allow.
Web UI
The Flipt Web UI is a modern, minimalist UI to allow you to easily set up and monitor your feature flags and experiments. It’s served as a JavaScript Single Page Application (SPA) and communicates with the Flipt Backend Service through the REST API.
A guide to using the UI for the first time can be found in the Getting Started documentation.
Database
Flipt can be run with either SQLite, PostgreSQL, MySQL, or CockroachDB databases. The Configuration documentation shows how to enable each database.
Technologies
Flipt is built using several amazing open-source technologies including:
Go
From the Go documentation:
Go makes it easy to build simple, reliable and efficient software.
These are all goals that Flipt also aspires to. Flipt was written in Go mainly because of its ability to produce bulletproof systems software as a single binary for multiple architectures.
This allows Flipt to easily be deployed in almost any environment since it’s as simple as copying a compiled binary.
GRPC
gRPC is a high-performance, open-source RPC framework created by Google. gRPC allows Flipt to be performant by eliminating much of the overhead incurred by using standard HTTP for communication.
gRPC also has the benefit of being able to generate client SDKs in many different languages from a single Protobuf file.
This allows you easily integrate your services with Flipt regardless of the language that they’re written in.
GRPC Gateway
While awesome, gRPC might not be for everyone. gRPC Gateway is a reverse-proxy server which translates a RESTful JSON API into gRPC. This allows Flipt to implement a REST API as well as the gRPC API described above.
This means that the REST API follows the same code paths as the gRPC service that Flipt implements, allowing for reduced bugs and a simpler architecture.
The Flipt UI is also built on top of the REST API provided by gRPC gateway.
Was this page helpful?