_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Feature Flags implementace

25. 02. 2025 1 min read intermediate

Architecture Intermediate

Feature Flags implementace

Feature FlagsDeploymentRelease 3 min read

Postupný rollout nových funkcí. Kill switches, percentage rollout a A/B testing.

Types

  • Release Toggle — postupný rollout (10% → 50% → 100%)
  • Experiment — A/B testing
  • Ops Toggle — kill switch
  • Permission — funkce pro specifické plány

Implementation

class FeatureFlags {
    isEnabled(flag, ctx = {}) {
        const f = this.flags[flag];
        if (!f?.enabled) return false;
        if (f.percentage !== undefined) {
            return (this.hash(ctx.userId) % 100) < f.percentage;
        }
        if (f.allowedUsers?.includes(ctx.userId)) return true;
        return f.enabled;
    }
}
// Konfigurace
const flags = new FeatureFlags({
    newCheckout: { enabled: true, percentage: 25 },
    darkMode: { enabled: true }
});

Tools

  • LaunchDarkly — enterprise
  • Unleash — open-source
  • Flagsmith — open-source + cloud

Summary

Must-have pro continuous delivery. Udržujte disciplínu — pravidelně odstraňujte staré flags.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.