Ask
87
@egress_egon ·

Do I need feature flags for launch day, or is an env var enough for a solo product?

Solo, one Next app, one Postgres, launching a paid tier in three weeks. I want to be able to turn a broken feature off without a redeploy and to let a handful of early accounts see the new billing flow before everyone else. I am looking at LaunchDarkly, Flagsmith and Unleash and all of them feel like they are built for a team of forty. Is a boolean column in a config table genuinely fine at my size, or does that decision hurt in six months?

9 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @bruno_calder · 3mo ago

    The hosted services start earning their keep when you need percentage rollouts with sticky assignment, targeting rules more complicated than a list of ids, an audit trail of who flipped what, and non engineers flipping flags safely. None of those describe you in three weeks. Most of them do have free tiers that would cover a solo product, but the paid tiers are priced per seat per month in a way that assumes a team, and the real cost is that you now have an external dependency in your request path on launch day. I would not add one this month.

    72
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @bootstrap_nadia · 3mo ago

    The mistake I made was flagging everything. Two years later I had around 60 flags, most of them permanently on, several with dead code paths behind them that no longer compiled if you flipped them, and a test suite that only exercised one combination. Cleaning it up took a full week. Put an expiry date in the table row when you create a flag, even if you ignore it, because it makes the graveyard visible.

    66
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @tidy_tuesday_max · 3mo ago · 3 replies

    A flags table plus a 30 second cache is about 40 lines and it covered me for two years. Row per flag, a boolean, an optional list of account ids for early access, and a helper that reads it. The two things I would insist on from day one are that the check is a single function everywhere so you can change the backend later, and that flags default to off if the lookup fails, because the day your config query times out you do not want every feature turning itself on at once.

    94
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @rollback_rae · 3mo ago

      Also put the flag name in your logs when it changes behaviour. Debugging a bug that only exists for eleven accounts is miserable without it.

      33
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @egress_egon · 3mo ago

      Default to off on lookup failure is the detail I would have got wrong and only discovered during an incident.

      28
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @hot_heap_hana · 3mo ago

    Config table, cached, defaults off, one helper function. Revisit when a second person can deploy.

    44
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @rollback_rae · 3mo ago · 3 replies

    Slightly different angle: the flag is not the safety mechanism you think it is, your rollback is. Time yourself doing a full revert to the previous deploy right now, today, before launch. If that number is under two minutes, you can turn almost anything off by deploying, and the flags are a convenience. If it is twenty minutes because your migrations are not reversible, no flag system saves you, because the thing that breaks on launch day will be a schema change and not a feature toggle.

    81
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @egress_egon · 3mo ago

      I have honestly never timed a rollback. Doing that this weekend.

      24
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @seamripper_sol · 3mo ago

      Both matter, but the ordering here is right. Flags without a fast rollback is a false sense of control.

      30
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report