Feature Flags Implementation: Unleash, Growthbook, Canary Releases
Feature flags solve a classic DevOps problem: how to deploy code without enabling new functionality for all users. Suppose you roll out a new feature – within a minute you get a 500 error. Without flags, rollback means rebuild and redeploy. With flags, you flip a flag in seconds. We implement feature flags turnkey: choose a tool (Unleash, Growthbook, PostHog), deploy infrastructure, and integrate into your application. The result – feature management without risk and downtime. Our engineers hold certifications in Unleash and Growthbook, ensuring stable operation after implementation.
What problems do feature flags solve?
Trunk-based development – all developers work in the main branch, unfinished features hidden behind flags. Canary releases – you roll out a new version first to 1% of users, monitor errors, then expand to 100%. A/B testing – compare conversion of two variants. Kill switch – instantly disable a problematic feature without a deploy. Beta programs – grant access to select accounts. In practice, these scenarios cover 90% of team needs. According to the State of DevOps report, teams with feature flags experience 40% fewer rollbacks and deploy twice as often. One of our clients – an e-commerce platform – reduced critical incidents by 60% within three months of implementation and increased release frequency from once every two weeks to multiple times per day. The switch to trunk-based development eliminated merge conflicts from feature branches.
Why implement feature flags?
If you don't use flags, every release is a risk. An error in a new feature can crash the entire service, and rollback takes time. Flags turn deployment into a safe process. For example, one client reduced downtime by 40% and cut operational costs by 30%. Feature flags also help lower incident count by 40% and reduce deployment time by 70% due to fewer release windows.
What to choose: self-hosted or cloud?
| Criterion | Self-hosted (Unleash / Growthbook) | Cloud (PostHog / LaunchDarkly) |
|---|---|---|
| Data control | Full, data on your servers | Data at provider |
| Cost | Free (open source) + hosting | Subscription (separate budget) |
| Maintenance | Your team administers | Provider handles |
| Flexibility | API and custom strategies | Limited settings |
Self-hosted is suitable if security and customization are important. Cloud – if you want to minimize DevOps overhead. We help with the choice and configure both options.
How to set up Unleash (self-hosted)
We deploy Unleash with PostgreSQL: Docker Compose configuration and startup.
docker compose up -d cat > docker-compose.yml << 'EOF' services: db: image: postgres:16 environment: POSTGRES_DB: unleash POSTGRES_USER: unleash POSTGRES_PASSWORD: secret volumes: - pg_data:/var/lib/postgresql/data unleash: image: unleashorg/unleash-server:latest ports: - "4242:4242" environment: DATABASE_URL: postgresql://unleash:secret@db/unleash INIT_CLIENT_API_TOKENS: "default:development.unleash-token" depends_on: - db volumes: pg_data: EOF After startup, we configure integration with Next.js (Server Components):
// lib/unleash.ts import { initialize, isEnabled, getVariant } from 'unleash-client'; export const unleash = initialize({ url: 'http://unleash:4242/api', appName: 'my-nextjs-app', customHeaders: { Authorization: process.env.UNLEASH_TOKEN! }, }); export async function isFeatureEnabled(flag: string, userId?: string) { await unleash.isReady(); return isEnabled(flag, { userId }); } // app/page.tsx (Server Component) import { isFeatureEnabled } from '@/lib/unleash'; export default async function HomePage() { const showNewHero = await isFeatureEnabled('new-hero-section', userId); return showNewHero ? <NewHeroSection /> : <OldHeroSection />; } Growthbook for A/B tests
Growthbook provides built-in experiment statistics. Deployment via Docker:
docker run -d \ -e MONGODB_URI=mongodb://mongo/growthbook \ -e APP_ORIGIN=http://localhost:3000 \ -p 3000:3000 \ growthbook/growthbook:latest SDK for React:
import { GrowthBook, GrowthBookProvider, useFeatureValue } from '@growthbook/growthbook-react'; const gb = new GrowthBook({ apiHost: 'https://cdn.growthbook.io', clientKey: process.env.NEXT_PUBLIC_GROWTHBOOK_CLIENT_KEY, enableDevMode: process.env.NODE_ENV !== 'production', trackingCallback: (experiment, result) => { gtag('event', 'experiment_viewed', { experiment_id: experiment.key, variant_id: result.key, }); }, }); function App({ Component, pageProps }) { return ( <GrowthBookProvider growthbook={gb}> <Component {...pageProps} /> </GrowthBookProvider> ); } function PricingPage() { const showAnnualPricing = useFeatureValue('annual-pricing', false); const ctaText = useFeatureValue('cta-text', 'Get Started'); return ( <div> <button>{ctaText}</button> {showAnnualPricing && <AnnualPricingSection />} </div> ); } How to avoid tech debt from flags?
Flags must have a lifetime. Create each flag with an expiration date, e.g., 30 days after enabling. Use a CI script that finds flags older than a specified period and marks them as tech debt. Regularly remove dead flags from the code. This reduces cognitive load on the team and prevents accumulation of zombie flags.
Our work process
- Analysis – we study your application architecture and select the tool (Unleash / Growthbook / PostHog).
- Deployment – we set up infrastructure (Docker, Kubernetes, or cloud).
- Integration – we embed the SDK into your application (Next.js, React, Vue, Laravel, etc.).
- Configuration – we configure targeting strategies and rollout rules.
- Documentation – we document the flag workflow and removal process.
- Training – we conduct a 2-hour workshop for your team.
- Support – 2 weeks post-implementation.
What's included
- Code and architecture audit of your current application.
- Infrastructure selection and deployment (self-hosted or cloud).
- SDK integration with your stack (React, Next.js, Vue, Laravel, and others).
- Configuration of targeting strategies and rollout rules.
- Documentation on flag usage and removal.
- Team training (2-hour workshop).
- Guaranteed support for 2 weeks after implementation.
Timelines and cost
Basic setup takes 1–2 business days. If customization or complex integration is required, the timeline extends to 3–5 days. Cost is calculated individually based on project complexity. Leave a request – we will conduct a code audit and propose the optimal solution.
Tool comparison
| Tool | Type | Strengths |
|---|---|---|
| Unleash | Self-hosted | Simplicity, custom strategies, low entry barrier |
| Growthbook | Self-hosted / Cloud | Built-in A/B test statistics, visual editor |
| PostHog | Cloud | Product analytics + flags in one, behavioral targeting |
For simple flag management, Unleash is 3x easier to set up than Growthbook. But if you need A/B testing with powerful statistics, Growthbook is 2x more convenient for analysis (based on client feedback).
Contact us for a consultation – we will assess your project and help you choose the right tool. Order feature flag implementation and start managing features without risk.







