- Published on
Toogle features for mobile comparation remote config and unleash
- Authors
- Name
- Haris Setiyono
1. Firebase Remote Config
How It Works
Firebase Remote Config stores configuration parameters in the cloud and syncs them to the app. Developers set up key-value pairs in the Firebase Console, which are pulled by the app at runtime.
Pros
- Tightly integrated with Firebase ecosystem: Works seamlessly with other Firebase services like Analytics, Crashlytics, and Firebase Authentication.
- Ease of use: Firebase Remote Config has a straightforward setup and is simple to implement for toggling features.
- Real-time updates: You can change the app configuration in real-time without requiring users to update the app.
- Targeted feature delivery: Allows you to deliver features based on user segments (location, device, language, etc.).
- Free tier available: Firebase Remote Config provides a free tier with ample limits for most small to medium applications.
Cons
- Limited rule complexity: Although Firebase Remote Config offers conditions and targeting based on user properties, it's not as flexible or complex as specialized feature toggle tools like Unleash.
- Single ecosystem: It works best if your app is already within the Firebase ecosystem. If you want to avoid vendor lock-in, Firebase might be limiting.
- Limited audit trail: Firebase doesn’t offer detailed audit logs or role-based access for managing configurations compared to more advanced solutions.
Example Use Case
- Use Firebase Remote Config when you want to roll out a new UI feature only to users in certain countries. For example, you want to test a dark mode feature for users in Australia and New Zealand before rolling it out globally.
When to use Firebase Remote Config:
- When you need quick and simple toggling.
- You are already using Firebase services.
- Your app needs real-time updates for feature flags with limited complexity.
Best Practices
- Caching: To avoid fetching too often, Firebase Remote Config uses caching. You can control how often it fetches new values by setting
minimumFetchInterval
- Rollbacks: You can easily roll back a feature if it causes issues by toggling the feature flag off in the Firebase Console without needing an app update.
- Targeting Segments: Firebase allows you to create custom user properties, so you can deliver features based on app version, country, device type, etc.
Advanced Use Cases
- A/B Testing: Firebase Remote Config integrates with Firebase A/B Testing, so you can test features by rolling them out to different groups of users and evaluating their performance based on Firebase Analytics data.
- Dynamic UI Adjustments: Modify your app’s UI remotely. For example, you can change the color scheme, text, or layout without pushing a new app update.
2. Unleash
How It Works
Unleash is a feature management solution that gives developers more granular control over toggling features, rollouts, and experimentation. It supports more advanced use cases than Firebase Remote Config by allowing complex conditions for toggling features.
Pros
- More advanced targeting and rules: Unleash provides flexible feature toggle rules based on advanced user properties and conditions.
- Open-source: Unleash is open-source, so you have full control over the implementation. You are not locked into a specific vendor.
- Granular control: Unleash offers more control over how and when features are toggled, with options for percentage rollouts, user group targeting, and more.
- Good audit trails and versioning: Unleash provides detailed logs for configuration changes and supports role-based access control.
Cons
- Not tightly integrated with other services: Unlike Firebase, Unleash doesn’t natively integrate with other popular services like Firebase Analytics or Crashlytics.
- Requires hosting or using managed service: Unleash can be self-hosted, which might require more setup and maintenance, or you can opt for the paid managed version.
- No real-time updates: Unlike Firebase Remote Config, Unleash doesn't offer real-time updates as easily, and features may require a refresh interval or pull mechanism.
Example Use Case
- Use Unleash when you need to toggle a complex feature based on multiple factors like user roles, percentage of users, specific teams, or gradual rollout. For example, rolling out a payment gateway update to 10% of users based on their subscription plan.
When to use Unleash
- You need advanced feature flag management with flexible targeting.
- You want an open-source solution to avoid vendor lock-in.
- You require detailed audit logs and strict access control.
Best Practices
- Custom Strategies: Unleash allows creating custom strategies like percentage rollouts, gradual feature rollouts to specific users, or targeting by user IDs, roles, or even geographical locations.
- Granular Control: You can create different environments like development, production, and staging and assign different toggles for each.
- Versioned Changes: Unleash provides version control, meaning you can audit when and how feature toggles were changed.
Advanced Use Cases
- Percentage-Based Rollout: Roll out a new feature to 10% of your user base initially, then gradually increase the percentage as you gain confidence in the feature.
- Multiple Strategies: Use different strategies for different user groups. For example, toggle a feature for internal employees but not for external users, or enable a beta feature only for premium users.
- Experimentation: You can create experiments by toggling features for specific user segments and analyzing their performance using analytics tools like Mixpanel or Google Analytics.
3. Firebase Remote Config + Unleash (Hybrid Approach)
You can also use both Firebase Remote Config and Unleash together for different purposes in the same project:
- Firebase Remote Config for simple, real-time toggles (e.g., enabling a temporary banner for all users or turning off a feature during a critical bug).
- Unleash for more granular and controlled rollouts (e.g., enabling a feature for specific user segments or gradual percentage rollouts).
Example Hybrid Use Case
- A mobile app can use Firebase Remote Config to toggle minor feature flags like UI changes or turning on a promotional campaign banner. For larger, complex feature rollouts, Unleash can handle targeting different regions, user groups, and percentage rollouts.
Summary of Pros & Cons
Criteria | Firebase Remote Config | Unleash |
---|---|---|
Integration | Excellent with Firebase | Independent, not tied to any service |
Complexity of Feature Toggles | Limited (simple targeting) | Advanced (complex rules, user targeting) |
Ease of Use | Very easy, quick setup | Requires setup, steeper learning curve |
Real-Time Updates | Yes, supports real-time | Requires manual refresh or polling |
Audit Trails | Basic | Detailed with version control and access logs |
Cost | Free tier with limits | Open-source, paid managed service available |
Vendor Lock-In | Yes | No, open-source flexibility |
\
Choosing Between Firebase Remote Config and Unleash
Scenario | Firebase Remote Config | Unleash |
---|---|---|
Need simple toggle logic | ✔️ | ❌ (Overkill for simple use cases) |
Already using Firebase ecosystem | ✔️ | ❌ |
Need real-time updates | ✔️ | ❌ (Unleash depends on refresh intervals) |
Need advanced targeting and segmentation | ❌ (Limited flexibility) | ✔️ (Very flexible with multiple strategies) |
Self-hosting preference | ❌ (Cloud-only) | ✔️ (Self-hosted, open-source) |
Free service for small scale | ✔️ (Generous free tier) | ✔️ (Free, open-source version) |
Detailed access control and audit trails | ❌ | ✔️ (Granular logs and access control) |
Need integration with A/B testing | ✔️ (Firebase A/B Testing) | ❌ (No native A/B testing) |
Final Thoughts
- Firebase Remote Config is ideal if you're already using Firebase, need real-time updates, or your feature toggles are relatively simple.
- Unleash is better suited for complex scenarios where granular control, advanced targeting, and multiple rollout strategies are needed. If your app requires strict control over feature deployment, Unleash is more powerful.