Building for Speed and Scale
DevCycle Architecture Overview
When building DevCycle, we focused on core design goals to create SDKs that are easy to understand, consistent across platforms, and optimized for fast, local feature flag evaluation. See how our Client, Mobile, and Server SDKs provide quick global answers and local assessments, with continuous improvements like full Server-Sent Event (SSE) connection implementation.
How it works
Features created in the Dashboard interact directly with our Management API.
Management API changes are delivered by a Queue to the Config Service.
The Config Service bundles any changes into a JSON configuration file for each environment, project, and SDK type (mobile / client / server).
The created configuration files are served by Cloudflare CDN, which is globally distributed to serve traffic at scale.
The Config Service invalidates Cloudflare's CDN cache in ~1 second globally and notifies SDKs via a server-sent event (SSE) connection that updates are available.
DevCycle SDKs
All of our SDKs are open-source. The SDK retrieve and process CDN configuration files. This requires APIs, user, and project data, and a bucketing library to determine user outcomes like what feature flags they are served. The SDK ensures global response speeds in servers, mobile, and client-side contexts.
Server SDKs
The Server SDK retrieves the configuration file updates from the CDN via SSE updates or polling against the CDN. The configuration file is then passed into a shared WebAssembly bucketing and segmentation library.
The bucketing and segmentation library combines user data, device data, and the project configuration to bucket users into features and variations to determine variable values.
Event data is aggregated and sent on an interval to our Events API.
Client SDKs
Mobile and Client SDKs (like JavaScript SDKs) interact with the Client SDK API served by Cloudflare Workers at the edge for fast global response times.
Cloudflare Workers and server SDKs use the same shared WebAssembly bucketing and segmentation library to ensure consistency and shared logic across environments.
Event data is aggregated and sent on an interval to our Events API.
The Client SDKs make SSE connections to receive configuration updates in real-time.
Event data is sent on an interval to our Events API.