It's funny, I feel like it's one of those places that is so easy to get it in. Right? I mean, like, when you have an MVP out, I think this is one of those, like, technologies also has, like, staying power. Right.
Like, you know, you don't meet a project manager at Series C who's like, man, I really wish we didn't have feature flags. Right.
And I feel like it's one of those things that's so easy to get in early, and it just helps you ship better quality product and also, like, maintain those cloud costs. Like you're saying, it's like not having a staging environment. It's amazing.
Right now there's a bit more rigor to like using feature flags, like responsibly. I would love to like, you know, hear some of your thoughts on that.
But like that same rigor is used to set up and maintain that staging environment and that thing costs you money all day long. Right. So like being able to get stuff out in the production I think is really, really valuable. That being said, it is deeper in your code.
What are some of the ways that you've seen platform teams start to embrace feature flagging?
Maybe what you're doing now at rippling and how do you I guess instill good practices in a team for where to use them and how to use them to cut out a feature and how to clean them up efficiently?
One of the things I've seen is some teams just tend to use them very much on the front end and they say, hey, we built the feature out, you can actually hit it if you hit our API, but we hide it from you using a feature flag. And I've seen other teams where it's like they feature flag down the whole stack.
You can't see it in the UI and you can't access the endpoint unless you're in the flag. Right. And it's like kind of different approaches to like how you want to scope this stuff.
But like how are you seeing platform teams use this internally? Are they using it, are they surfacing it to their end user customers?
And what are some of the practices you're seeing that work well with feature flags?
So I'm probably going to miss a couple things and we'll maybe revisit them, we'll dig in. But I think yeah, there's a lot of different ways to use flags and I think you touched on a few of them and all of them are pretty reasonable.
It just kind of depends on like what type of product you have.
Like, I think that a really simple way to use flags is to just use them in the front end and like ship APIs that aren't used unless you are calling them from the front end.
And that works great if you know, you don't have any concerns about like your customers spelunking into your APIs and trying just like to do random curl requests and you have like a really UI driven product. Like that's a really good approach.
I think that one place where the, you know, when you start thinking about like full stack flagging and like using flags on the back end, a place where this comes in is a lot of value.
Is like whenever you're doing some kind of like performance optimization, you can now be really rigorous about it because like if you're like this query is really important, that the performance is like uniformly better. Yeah. And I'm like spending a bunch of time optimizing this query with a flag.
You can like really do like an actual like a B test type experiment and see how the query latency is changed like with live traffic. And if it doesn't have the result you expected, like you can turn it off really quickly.
So those type of things are I think super powerful for back end flagging.
And if you're on a team that is like kind of, you know, responsible for the performance of some kind of like shared database or something like this, it's a really, really effective tool because you not only get really kind of like high fidelity measurement of live traffic, but you also have the ability to react super quickly if something isn't as you expected. You don't have to do a redeploy or anything like this.
So yeah, I think that query optimization is like a good, it's kind of a canonical example of kind of like a backend flag.
Oh, yeah, yeah, yeah, yeah. Even with the flag, you can still get a little stressed.
Several years ago, you know, we needed to kind of like change the entire data ingest layer of LaunchDarkly. And you know, we used a feature flag to do the migration.
It was like, there's this sort of daily ritual I had where I was like, okay, let's expose like 5 more percent of traffic into the new data ingest system that like has some scale issues that we're working through. And it would be like, okay, turn on 5% and then like, stare at these graphs for like 30 minutes and see if anything goes up and to the right really quick, like abruptly, and if so, then like, roll it back. But that was just like a ritual I had for a while of that was, you know... it was a little stressful, but it would have been way, way worse if it weren't that.
I actually wrote a talk about that and then I compared it to like... in this Bay Area, there's like the San Francisco-Oakland Bay Bridge, and they replaced one of the spans like, like 10 years ago now. And when they did that, they had to like, they built like a whole second bridge next to the bridge and then they'd close the bridge for a long weekend and reroute all the lanes between it. And if anything was wrong, it was just like, "Oh, this crucial artery is just out forever," or not forever, but for a significant amount of time. So the amount of testing and stuff they had to do to get the confidence that that would work, I mean, it's a bridge, so they were going to do it anyways, I guess.
But it's Just interesting to compare how things operate in real world infrastructure and software infrastructure and how much more control you get and how much faster you're able to move as a result.
Oh, man, you got me. We had... geez, this was like two years ago. We had redone a major, like, replatforming, and we were kind of doing the thing where... I think people use feature flags a lot for this... where you want to opt into the new UI, right? And it's like, "Oh, I don't like it. I want to go back to the old one."
Well, we hadn't got to that level of maturity yet where we're ready for customers to pick whether or not they wanted the UI. And internally, we're using it. We're like, "This is great. This is awesome." And we put a few of, like, our bigger customers into it, and then we just forgot that there was a feature flag, like, gating off this whole new great experience of the old experience. And we just had a while where people were signing up for the platform and they were like, "This thing's a real piece of shit." And we're like, "What are you talking about? We overhauled the shit out of this thing for, like, months." And we just forgot, like... all of our paying customers were in the flag, everybody internally was in the flag, but no new customers were in the flag.
I think that is like one of the two big things that I'm always watching for with flags is (A) we have 100% flags that are rolled out that we forgot to clean up, and they're like, littered across the code base. And (B), this exact thing of, like, you have a flag, you've rolled it out to, like, a high percent people, but not to everybody, and you've just forgotten about it. Right?
So you said you kind of have a pattern now where it's like, max four flags per person. How have you seen people solve this in the past when you're at LaunchDarkly? And how are you thinking about it now with the team that has such a high number of flags in flight?
One thing that I've seen that's kind of an interesting way to use feature flags along with OTel that we do internally that we've really grown to like. We're an early stage startup, so our API is rapidly changing, adding functionality as we're kind of stabilizing the business.
And at the same time we don't want to release a million versions of our API. We also don't want to break stuff for customers. And so we kind of have this sort of fluid live API.
And so what we do is currently we mark essentially like fields on our API. We use GraphQL, so fields, queries, mutations, we'll mark them as deprecated, like when we're ready to start deprecating.
And that'll remove it from our docs, which is cool. So like nobody's going to learn about it and start using it.
And then what we do is we actually put those deprecated accesses on our OTel traces so we can actually see in OTel we have a dashboard of like who's still using deprecated features. So this is obviously only people that are actively using it.
But like our, our activity is pretty high so it's like people are using it for deploying their software every day. So it's like we're not seeing customers leave for a month and then come back to use something. It's like it's integrated constantly, right?
So we can see people kind of using these deprecated fields. We'll email people, say, hey, we got this better experience, like, start using this or upgrade your CLI, et cetera.
But one of the things that we do like, as a part of our deprecation process is use feature flags.
So when we actually get to the point where we're ready to fully deprecate something, we actually feature flag people out of it so that if we do find somebody, for whatever reason was using a feature that we deprecated and they're still dependent on it, we can actually bring that back because we see there start to be some essentially SLO that's being violated. Sorry, SLO.
Gosh, I mix up my SLA's, SLI's and SLO's, I know that makes me a bad person, but dyslexia, we'll start to see that there's errors there and it's around the deprecated field and we'll actually bring it back in for that person so that we're not breaking their software. And then we'll be like, hey, like, you know, we had a deprecation window for this. Like, we enabled it back for you, right?
And so it allows us to kind of like get people off of that and make sure people aren't using something deprecated and kind of like slowly like wean off the customer base. And then we'll just have like a very small portion of people that are able to use it.
And then we, as we turn that off and like work through like the deprecation, we're like, ah, we were able to fully remove it, but like, if we ever get to that point where it's like a week later, it's this weird feature and somebody's using it again, it'll fail, but then like flip back on. So it's been a really interesting way to like, kind of control not just the introduction of a feature, but like the retirement of a feature.
You know, for the, the second one's maybe more generally applicable. So we start there.
But a pattern that I have seen is where people will just kind of like put a flag around, you know, the code you're writing with AI and you know, just develop the feature kind of like, like normal, but then you, you know, you have, you know, you have that, that flag around it. So if you. Something doesn't work out, you're all good.
And similarly in that additional level of control lets you kind of delegate more to an AI coding agent or something like this to have them produce a feature, like the agent produce a feature and put it wrapped in a flag is definitely something I've seen.
And then on the other side of people that are building AI products, like, I think observability for AI products has kind of been an interesting place where it's hard to always know, like there's not like a, an error that's going to be logged if you get like a not great response from your like LLM call.
So there's, you know, a lot of products that are made to help you figure out like based, like offline, like, you know, you had all these evaluations and then there's a lot of products that help you figure out were these good or bad.
And one tool that it seems like more mature teams in that space use is experimentation to, as they make a change to how they're calling the model or which model they're using, they'll use just normal experimentation, A/B testing as kind of like the final step of a release because that's kind of like the best signal you'll get. Is did this change have the effect on user behavior that I anticipated? And experimentation is a really good tool for that.
So those are a couple of ways that people use it.
It's interesting too because when the new models come out and it's like everybody kind of recoils because it's like got so much dumber, lost all my whatever.
But yeah, I feel like when you've spent so much effort and I feel like it is a lot of effort to get a good prompt, it's like everybody's like, oh, why don't you just AI it? It's like, well the prompt is so hard.
Yeah, but like once you, once you've got a good prompt and like a good set of agents like configured and like working together and then a model changes like oof, that's disruptive. Right. And it's hard. Kind of going back to what I was saying earlier, like how we use it, like migrate subsystems.
I think that's a really great place to be able to swap out like subsets of users. Say like, hey, what is, what does it look like for us with these prompts and agents on the new model? Right?
Just being able to see like how much it has changed and like slowly rolling your customers onto that new model before you just kind of like whole shebang, like hey, let me just change the model name in this config and deploy to production and see how different this is for everybody. Right? Like we do have a big bag of non-determinism and this is one of those one places where it's like you can exhibit some control over it.
I think that in the age of AI, these feature flags become even more important.
Another place I've seen it used a little bit is internally is around the actual prompts, controlling the prompts themselves through the feature flags. And somebody might be saying why. It's like it's very easy to get your rigging into prod, but this one of those things that also kind of sucks a bit.
It's like your data that you have locally, like while you're testing a prompt or whatever is very different than the data that you have in production. Right?
And like that whole like test in Prod, it's like it's very hard to get a good prompt working with like pseudo fake factory eyes, like local data versus like the stuff you have in prod. And when you have super sensitive stuff, it's hard to take super sensitive stuff from PROD to local to test on it.
And like some of the things that we found is pretty interesting is like, hey, push up our rigging for, like, agents and whatnot, but we're actually going to control the prompts until we're happy through feature flags and essentially feed them in.