Matt Blair

Matt Blair

I read that you learn more from a poor example than from a correct one. I don't believe this but that means my site will be a success.

Build vs. Buy

A Debate around Feature Flags

3-Minute Read

In the software development world, teams often face the dilemma of whether to build a tool in-house or purchase an existing solution. This “build vs. buy” debate can significantly impact a company’s efficiency, budget, and focus. A quintessential example of this debate is the implementation of feature flags.

Understanding Feature Flags

Feature flags, or toggles, are a powerful technique that allows developers to enable or disable features in a production environment without deploying new code. They provide granular control over feature rollouts, enabling A/B testing, canary releases, and quick rollbacks.

The Case for Building

Building a feature flag system in-house can seem appealing for several reasons:

  1. Customization: An in-house system can be tailored precisely to the company’s needs, integrating seamlessly with existing processes and workflows.
  2. Cost Savings: Initially, building might appear cost-effective compared to the recurring costs of a third-party service.
  3. Control and Security: Full control over the feature flag system means that sensitive data remains within the company’s infrastructure.

An example from a past experience involved developing a bespoke feature flagging system. The system was highly targeted to specific use cases that the company had, and provided a financial advantage over commercial solutions like LaunchDarkly (LD) based on monthly active users (MAU) costs.

However, these benefits often come with significant downsides:

  1. Resource Allocation: Building a robust feature flagging system requires dedicated engineering resources. These resources could be better spent on core business features rather than maintaining internal tools.
  2. Maintenance and Scalability: As the company grows, the internal tool must scale accordingly. This scaling can become a continuous, resource-intensive effort.

The Case for Buying

On the flip side, purchasing a feature flagging solution can be advantageous:

  1. Immediate Availability: Third-party solutions like LaunchDarkly offer mature, battle-tested platforms ready for immediate deployment.
  2. Focus on Core Competencies: Using a commercial solution allows engineering teams to focus on building features that drive the company’s core business.
  3. Advanced Features and Support: Vendors provide advanced functionalities, ongoing updates, and dedicated support, which can be costly to replicate internally.

For instance, at one point, a company’s internal flagging system was insufficient, leading to the decision to adopt LaunchDarkly. This shift allowed engineers to prioritize core product development instead of diverting their efforts to maintaining and improving a feature flag system which had known shortcomings.

Real-World Insights

Several industry professionals have weighed in on this debate:

  • Efficiency vs. Investment: One engineer noted that while building a feature flag system at a previous company provided a financial win, it also became a continual cost due to the need for ongoing enhancements and maintenance.
  • Dangerous Practices: Another highlighted the risks associated with makeshift solutions which can introduce chaos and security vulnerabilities.
  • Adapting Tools: Some suggested that adopting purpose-built tools from the start could have prevented the proliferation of risky practices and streamlined operations.

Conclusion

The decision to build or buy a feature flagging system hinges on various factors, including company size, budget, and long-term goals. At a smaller scale, building might offer tailored benefits and cost savings. However, as the business grows, the focus often shifts to leveraging commercial solutions to ensure scalability, security, and a sharper focus on core business functionalities.

In essence, the right approach is to build the simplest solution that meets current needs and transition to a commercial product when the internal system’s maintenance becomes unsustainable. This strategy allows companies to balance cost, efficiency, and innovation effectively.

Recent Posts

Categories

About

This theme was developed for Hugo.