Introduction

Introduction

What is Lekko?

Lekko is a system for developers and their teammates to simply and safely modify functions at runtime.

What does it do?

Lekko solves the problems feature flagging should by allowing you to modify code behavior independent of code deploys. These are:

Problems to solve:

  • Deploys take time and can be messy, delaying feature releases
  • Feature git branches are a messy way to perform large rewrites
  • Fully reproducing production in a testing environment is a pain
  • It is difficult to target / rollout a feature by user, per company, region, etc. without knowing ahead of time
  • Distractions of one-off manual configuration requests or automating them
  • It is tough to protect the customer experience when requirements are not clear
    • A feature needs to get out to some early adopters for feedback without confusing everyone else

Feature Flagging has drawbacks:

  • Increased code complexity due to an external source of truth
    • frustrating local development
    • difficulty reproducing issues
    • difficulty in testing related code
    • extra boilerplate to create, manage, and cleanup flags
  • Technical debt
    • Fear of removing flags that aren’t obviously stale
    • Confusing logical code paths
    • Too easy to have failure states
  • Too easy to cause an outage or ruin specific users’ experiences
  • A new point of failure
    • in-code defaults are usually stale
    • reverting to a default can cause outages
  • Flags management:
    • hard to logically group
    • hard to track where a flag is being used
    • hard to figure out who a feature is turned on & off for
    • hard to figure out if you’re targeting the right people
    • hard to figure out what a flag does
  • Flags can easily be misused and cause issues

Lekko aims to address these problems and drawbacks with current feature flagging.

How does it work?

Lekko provides:

  1. Language and framework-specific tooling to decorate functions as lekkos which will fetch its latest definition from Lekko’s hosted service
// Whether to use experimental features or not
func getExperimentalEnabled(env string) bool {
  if env == "staging" {
    return true
  }
  return false
}

Is decorated to become:

// Whether to use experimental features or not
func (c *LekkoClient) GetExperimentalEnabled(env string) bool {
  ctx := context.Background()
  ctx = client.Add(ctx, "env", env)
  // evaluate locally using dynamic data from Lekko backend
  result, err := c.GetBool(ctx, "default", "experimental-enabled")
  if err == nil {
    return result
  }
  // something is wrong or API key is not set,
  // use static lekko function directly as a fallback
  return getExperimentalEnabled(env, feature, owner, repo)
}
  1. A hosted UI that allows you or your teammates to safely change functions without rebuilding and redeploying.

What should I use it for?

Any time an operational need may require you or someone on your team to change the behavior of your code.

Examples:

  1. Operational for Engineering: I need to deploy a change and feature flag it to roll out, roll back, or modify behavior for safety purposes.
  2. Operational for DevOps: I have a rate limit that I may need to increase or decrease in response to future traffic changes.
  3. Operational for Product: A product manager or I need to show a customer a preview (beta) of a new feature
  4. Operational for SKU Definition: A product manager or I need to define the product's allowed configuration even as new features are being developed.
  5. Operational for Customer Success: An account representative or I need to control the rollout of major features for enterprise customers
  6. Operational for Sales: A sales engineer or I must provide new customers with the allowed configuration they bought.
  7. Operational for Sales/Success: A sales engineer or I need to temporarily increase a usage limit or give access to a trial of a higher tier feature for a customer.

How does this compare to other systems?

Lekko is not a system for running statistically significant experiments. If you’d like that, checkout other experimentation tools.

Lekko is addressing the drawbacks of feature flagging because of two main differentiators:

  1. Focus on Developer Experience—Lekko is built for developers to trust. Lekko makes it very easy to add, remove, and manage lekkos in your code and proactively detects mess to reduce your technical debt. Lekko lets you define validation and gives tools to prevent you or your teammates from messing up the product you are shipping.
  2. Safety via SWE Principles—Most outages are either:
    • Caused by a flag flip or configuration change
    • Could have used a feature flag rollback to minimize changes

Lekko applies software engineering principles to keep you and anyone else changing code from making mistakes. Lekko uses the following techniques on your lekkos:

  1. validation
  2. source control
  3. CI
  4. static typing
  5. permissions
  6. simple heuristics
  7. advanced AI
  8. canary testing
  9. reviews

For a more detailed breakdown, please look at our marketing page.

TL;DR

  • Lekko takes a new approach to solving what feature flagging meant to
  • Lekko decorates simple functions as a lekko to fetch the latest version at runtime
  • Lekko mirrors your code, and provides a UI for you or your team to update it
  • Lekko applies software engineering principles to prevent problems from occuring