Types
Learn the differences between FlagSync’s client-side and server-side SDKs.
SDK Types
FlagSync offers two SDK types for different environments:
Client-Side
For single-user contexts (e.g., web/mobile apps).
Server-Side
For multi-user contexts (e.g., web servers, APIs).
Using Both SDK Types for SSR Apps
SSR web apps often benefit from using both SDKs for seamless feature management.
Server-side SDKs enable flag evaluation for redirects (e.g., rerouting if a feature is off) and tracking purchases, while passing flags to the UI to avoid client-side SDK calls.
Meanwhile, client-side SDKs track events like page_load_time
or button clicks, ensuring comprehensive data collection.
This combination is not uncommon and offers server-side control and client-side tracking flexibility.
Key Differences
Initialization
Client-side SDKs require a user context at initialization.
Server-side SDKs initialize without one.
Flag Evaluation
Client-side SDKs evaluate on FlagSync’s servers and send key-value pairs for the user to the client.
Server-side SDKs fetch full rulesets from FlagSync and evaluate locally at runtime.
Next Steps
Explore more about SDKs and flag evaluation:
- Set up an SDK in Setup.
- Learn SDK targeting logic in Targeting.
- Start with Quickstart: SDK.