 Hi everyone, welcome to my talk today. I'd like to talk to you about how to unleash your features Let me dive right into the implementation So what is a feature toggle feature toggle is essentially a branch in your code asking if this feature is enabled Then do this otherwise do that That is essentially what a feature toggle is but what's the use cases of using the feature toggles? so I want to start with a example I Work on a project called OpenShift cluster manager where we install a lot of OpenShift clusters and sometimes these clusters may break They may get into some weird state and they end up in an error state and what we wanted to do was we wanted the system to collect any piece of information it can and then Report it as a Gira ticket so we can track it. We will have all the information available on Gira for investigation and and have that Automated process running But when I started working on this feature, I thought to myself well There's kind of a risk we've introduced in this feature for once this Gathering of these pieces of information it may cause some performance issue We're talking about the service that is now supposed to communicate with another system Whether it's the cluster itself to get information from the cluster whether it's Talking to Gira and communicate with that system add all these information Pieces as attachments it might break it might fail So I was kind of concerned with How much risk am I going to introduce to the system just with having this background process running around? in my service, so I thought well, how can I reduce the risk of introducing this and One of the things that I thought was let's see. Let's try to think of introducing this With some activation strategy I want first I want the developers and the QE team or the QA team to be able to test that feature We've just a small amount of clusters just to see how it behaves to see that tickets are opened on a timely manner that the system is able to collect all these pieces of information from the cluster and have it attached to that Gira ticket and Once I have enough confident that the flow is working. I want to see some feedback I want to see some customers actually Going through that flow and see did I actually Increased the response time. Do I catch issues earlier than it? I could have caught them Without the solution and once I gain enough confident that everything is working and there's no performance penalty With this solution I can open it up for everyone and eventually remove that feature toggling from the code itself So there's many use cases for using feature tokens and this is just one of them So testing with just a small amount of users is one use case Of course, I'll need to collect some feedback from customers or use users And it doesn't matter if these are external customers or QA team internal developers So that's one use case one use case would be to test with a small amount of capacity So sometimes I don't really care who are the users that this feature will be enabled for them I care more about how much of the users will get exposed to that feature Because I want to monitor the system I want to see that it can handle the load and I can gradually open it up more and more for more users and more capacity and Once I make sure that the system can handle it or not and do the right tweaking I can Remove the toggle itself There's also a be testing of course I can test different paths and collect analytics information and decide which path is the best one to proceed with and A kill switch is is a great example. So I Can test my feature. I can have the QA team Assure me that it's working as expected I can have some customers using it or every everyone can use it But at some point there might be a surge Or like a huge amount of requests coming me coming in and then it may break the system I should have a way of hitting some switch to kill that feature and protect the system from Any incident and sometimes it's not the system itself. It may affect our system that the system is talking with So having a kill switch is a very powerful tool there Of course, it's also can be useful as an alternative for canary deployment with canary deployment You take your code you deploy it in a very controlled and safe environment. You test it and Once you're sure it's working as expected you deploy it to more parts But we feature toggles. It's kind of an alternative way of doing it You just deploy the functionality to the entire system, but it's disabled you can enable it at runtime on your own Time window when you're available when you have everyone on board that you need them to be and then You can test the feature and then you can switch switch it off when you need to at any point I Like to talk to you about unleash So unleash is a management system for feature toggles or feature flags It's open source project. It's available on github We're using it for a while now and the way it works is that the user is using your software Whether they are using the CLI or making an API call to your service They may have been using the UI itself somewhere in your code there's going to be that feature toggling asking is this feature is enabled and We've using unleash the flow will actually making an API call to the unleash system asking is this feature is enabled and providing some context like some user information any kind of context that is Important to make that decision and then unleash will respond with a yes or no And then your code will be performing that branching according to their response Now there's several activation strategies with unleash The basic one would be the one that you will probably expect it to have which is either on or off The feature can be disabled or enable. There's some user identification activation strategy so you can pick Activating something per user. It can be per session ID or IP address There's also the gradual rollout options, so I can say please open it up just for 30% of the request or 40% of the request it doesn't matter to who and then open it up gradually as I see as needed and Interesting part is that you can also extend it by writing your own custom strategy, so we are using that feature and we are actually Implementing a custom strategy, which is organization based So we pick an organization like a specific customer that they are very interested in Trying out this new feature this new functionality We've opened it up just for them just to play with get their feedback And then once we've made all the adjustment we can proceed and open it up for more and more customers So how do you start with unleash? You can install and run the binary itself. You can download it. There's also a hosted option Once you run it you log into the system you create a toggle and You pick an activation strategy for it now The other part you need to do is integrate with your code So you can use one of the available SDKs that unleash has it has several SDKs in different languages If you're using a different language and then you can just make an API call to the unleash system And that will essentially be asking unleash is this feature is enabled or not? So how does it look like? This is how the admin console of unleash looks like when you log into it You see a list of available feature toggles. These are features toggle feature toggles that we've created there's also the new feature toggle button that I've mentioned and If I'm gonna dive into one of the feature toggles, I will see something like this So on the upper part upper part, there's the feature name I Can see the features active I see a description of that feature over here and I see if it's Enabled or disabled And on that main part I see the activation strategy This specific feature is enabled just for a couple of organizations. One of them is the development Organization the other one is the QA organization. So we are testing How will the system behave if we are? Bypassing the limitation of number of compute nodes. We want to make sure that the system can handle it We want to make sure everything works as expected and then once we have gain confident Then we can open it up for everyone if I'll go into the metrics tab of Unleash feature. I'll see more data about the exposure rate So I see I can see how much request got into unleash asking it is this feature is enabled or not I can see how many requests got rejected or Accepted I can see it over different period of times 48 hours 24 hours and Etc. There's also event log. So it's kind of Important if I want to see for example, my morning tells me that there's some performance issue If I'll go into unleash I might see Someone enable some feature like in the last hour I can maybe correlate issues with that So that's also important for auditing I'll just summarize this presentation. So using feature toggles is a great way to test your product and Have its table as a service, of course unleashes a great system to manage your feature toggles and You can also implement your own strategies according to your own product needs and your own business needs And I'll take any questions now No, it's an open source project. Oh, sorry. The question was is unleash An open source project maintained by me or the team. No, it's not Open source completely not owned by red. Any other questions? Yeah so You need to consider that Sorry repeating the question. The question was how much overhead is there with using a leash? So you need to consider that every time your code would be asking if this feature is enabled It's going to do another API call now. Of course, there's some penalty for that You may catch the results you can introduce that into unleash client itself and then there's also You need to be aware that when you hit the switch on unleash it takes roughly I think three to five seconds until it syncs with all the clients. So Yeah, there's a performance penalty there that you need to be aware of any other questions Great question. So every time you pick Question was what happens if unleash is not available. So first of all, obviously you you should probably pick In a good as a la for the unleash system But if it's not available, then you're gonna need to set up a default for every feature. So Whether it's on or off, it's your decision, but yeah, you need to pick one One option. Yeah There's no other questions and I'm done. Thank you