Knowledge (XXG)

Feature toggle

Source 📝

314:(or canary launch or canary deployment) allows developers to have features incrementally tested by a small set of developers. Feature flags like an alternate way to do canary launches and allow targeting by geographic locations or even user attributes. If a feature's performance is not satisfactory, then it can be rolled back without any adverse effects. It is named after the use of canaries to warn miners of toxic gases ( 179: 25: 243:
inside these conditional statements can be toggled 'on or off' depending on the value of the feature toggle. This allows developers to control the flow of their software and bypass features that are not ready for deployment. A block of code behind a runtime variable is usually still present and can
262:
There are two main types of feature toggle. One is a release toggle, which the developer determines to either keep or remove before a product release depending on its working. The other is a business toggle, which is kept because it satisfies a different usage compared to that of the older code.
329:
states that a feature toggle "should be your last choice when you're dealing with putting features into production". Instead, it is best to break the feature into smaller parts that each can be implemented and safely introduced into the released product without causing other problems.
259:. Toggle debt arises due to the dead code present in software after a feature has been toggled on permanently and produces overhead. This portion of the code has to be removed carefully as to not disturb other parts of the code. 130:
The third use of the technique is to allow developers to release a version of a product that has unfinished features. These unfinished features are hidden (toggled) so that they do not appear in the
356: 422: 255:
The main usage of feature toggles is to avoid conflict that can arise when merging changes in software at the last moment before release, although this can lead to
101:. In agile settings the toggle is used in production, to switch on the feature on demand, for some or all the users. Thus, feature toggles do make it easier to 619: 776: 448: 252:
would not be executable. A feature flag approach could use any of these methods to separate code paths in different phases of development.
333:
Feature-toggling is used by many large websites including Flickr, Disqus, Etsy, Reddit, Gmail and Netflix, as well as software such as
515: 236: 484: 346: 326: 218: 98: 64: 302:
Feature groups consist of feature toggles that work together. This allows the developer to easily manage a set of related toggles.
196: 249: 200: 781: 46: 644: 232: 102: 86: 189: 35: 623: 720: 240: 670: 566: 245: 135: 351: 116: 695: 244:
be conditionally executed, sometimes within the same application lifecycle; a block of code behind a
127:
it. Software integration cycles get shorter, and a version ready to go to production can be provided.
82: 138:
features into and out of the productive branch, and hence allows many small incremental versions of
120: 112: 454: 480: 416: 124: 94: 747:"Office FeatureGates: How Microsoft Can Break and Fix Their Applications in Under 24 Hours" 435: 315: 123:
is deployed into a test environment once, the toggle allows to turn the feature on, and
256: 131: 540: 770: 379: 334: 401: 593: 119:. The feature is integrated into the main branch even before it is completed. The 516:"How to do Canary Release / Progressive Delivery with ConfigCat | ConfigCat Blog" 178: 106: 90: 746: 139: 203: in this section. Unsourced material may be challenged and removed. 541:"Canary Testing - Using Blue-Green Deployments and Feature Flags" 105:
often. Advanced roll out strategies such as canary roll out and
172: 115:
is supported by feature toggles, even if new releases are not
18: 436:
How GitHub Leverages Feature Flags to Ship Quickly and Safely
357:
Comparison of open-source configuration management software
380:"ALM Rangers - Software Development with Feature Toggles" 266:
Feature toggles can be used in the following scenarios:
42: 34:
may contain excessive or inappropriate references to
93:. A condition within the code enables or disables a 645:"How does Etsy manage development and operations?" 567:"Canary launches – how and why to canary release" 273:Enhancing an existing feature in an application. 85:provides an alternative to maintaining multiple 293:An entry in an external feature flag service. 8: 400:Martin Fowler 29 October 2010 (2010-10-29). 421:: CS1 maint: numeric names: authors list ( 721:"Preparing the Netflix API for Deployment" 620:"Partial Deployment with Feature Switches" 219:Learn how and when to remove this message 65:Learn how and when to remove this message 368: 270:Adding a new feature to an application. 414: 45:by removing references to unreliable 7: 395: 393: 374: 372: 201:adding citations to reliable sources 49:where they are used inappropriately. 502:Programming JavaScript Applications 450:Programming JavaScript Applications 290:A property in a configuration file. 117:deployed to production continuously 283:Feature toggles can be stored as: 14: 347:Software configuration management 594:"Flipping Out - code.flickr.com" 231:Feature toggles are essentially 177: 145:A feature toggle is also called 23: 188:needs additional citations for 276:Hiding or disabling a feature. 1: 696:"Developing Gmail's new look" 777:Software development process 16:Software development process 798: 745:Wolfe, Mike (2022-05-30). 287:Row entries in a database. 134:. There is less effort to 618:dcramer (July 9, 2010). 279:Extending an interface. 109:are easier to handle. 477:Managing Feature Flags 475:Echagüe, Pato (2014). 246:preprocessor directive 237:conditional statements 36:self-published sources 500:Elliot, Eric (2018). 352:Software product line 337:or Microsoft Office. 235:that are used inside 782:Computer programming 438:, infoq, 2021-05-09. 335:Google Chrome Canary 197:improve this article 83:software development 163:conditional feature 113:Continuous delivery 547:. 26 February 2021 479:. O'Reilly Media. 404:. Martinfowler.com 384:msdn.microsoft.com 651:. 4 February 2011 504:. O'Reilly Media. 239:. Therefore, the 229: 228: 221: 75: 74: 67: 789: 761: 760: 758: 757: 742: 736: 735: 733: 731: 717: 711: 710: 708: 706: 692: 686: 685: 683: 681: 667: 661: 660: 658: 656: 641: 635: 634: 632: 631: 622:. Archived from 615: 609: 608: 606: 604: 589: 583: 582: 580: 578: 571:launchdarkly.com 563: 557: 556: 554: 552: 537: 531: 530: 528: 527: 512: 506: 505: 497: 491: 490: 472: 466: 465: 463: 462: 453:. Archived from 445: 439: 433: 427: 426: 420: 412: 410: 409: 397: 388: 387: 376: 224: 217: 213: 210: 204: 181: 173: 87:feature branches 70: 63: 59: 56: 50: 27: 26: 19: 797: 796: 792: 791: 790: 788: 787: 786: 767: 766: 765: 764: 755: 753: 751:nolongerset.com 744: 743: 739: 729: 727: 719: 718: 714: 704: 702: 694: 693: 689: 679: 677: 671:"reddit/reddit" 669: 668: 664: 654: 652: 649:codeascraft.com 643: 642: 638: 629: 627: 617: 616: 612: 602: 600: 591: 590: 586: 576: 574: 565: 564: 560: 550: 548: 539: 538: 534: 525: 523: 514: 513: 509: 499: 498: 494: 487: 474: 473: 469: 460: 458: 447: 446: 442: 434: 430: 413: 407: 405: 402:"FeatureToggle" 399: 398: 391: 378: 377: 370: 365: 343: 324: 308: 300: 225: 214: 208: 205: 194: 182: 171: 159:feature flipper 71: 60: 54: 51: 40: 28: 24: 17: 12: 11: 5: 795: 793: 785: 784: 779: 769: 768: 763: 762: 737: 712: 700:googleblog.com 687: 662: 636: 610: 592:Harmes, Ross. 584: 573:. 7 April 2015 558: 532: 507: 492: 485: 467: 440: 428: 389: 367: 366: 364: 361: 360: 359: 354: 349: 342: 339: 323: 320: 316:Miner's canary 312:canary release 307: 306:Canary release 304: 299: 298:Feature groups 296: 295: 294: 291: 288: 281: 280: 277: 274: 271: 227: 226: 185: 183: 176: 170: 169:Implementation 167: 147:feature switch 132:user interface 79:feature toggle 73: 72: 31: 29: 22: 15: 13: 10: 9: 6: 4: 3: 2: 794: 783: 780: 778: 775: 774: 772: 752: 748: 741: 738: 726: 722: 716: 713: 701: 697: 691: 688: 676: 672: 666: 663: 650: 646: 640: 637: 626:on 2013-11-05 625: 621: 614: 611: 599: 595: 588: 585: 572: 568: 562: 559: 546: 542: 536: 533: 521: 520:configcat.com 517: 511: 508: 503: 496: 493: 488: 486:9781492028598 482: 478: 471: 468: 457:on 2016-09-15 456: 452: 451: 444: 441: 437: 432: 429: 424: 418: 403: 396: 394: 390: 385: 381: 375: 373: 369: 362: 358: 355: 353: 350: 348: 345: 344: 340: 338: 336: 331: 328: 327:Martin Fowler 321: 319: 317: 313: 305: 303: 297: 292: 289: 286: 285: 284: 278: 275: 272: 269: 268: 267: 264: 260: 258: 253: 251: 250:commented out 247: 242: 238: 234: 223: 220: 212: 202: 198: 192: 191: 186:This section 184: 180: 175: 174: 168: 166: 164: 160: 156: 152: 148: 143: 141: 137: 133: 128: 126: 122: 118: 114: 110: 108: 104: 100: 96: 92: 88: 84: 80: 69: 66: 58: 48: 44: 38: 37: 32:This article 30: 21: 20: 754:. Retrieved 750: 740: 728:. Retrieved 724: 715: 703:. Retrieved 699: 690: 678:. Retrieved 674: 665: 653:. Retrieved 648: 639: 628:. Retrieved 624:the original 613: 601:. Retrieved 597: 587: 575:. Retrieved 570: 561: 549:. Retrieved 544: 535: 524:. Retrieved 522:. 2022-02-09 519: 510: 501: 495: 476: 470: 459:. Retrieved 455:the original 449: 443: 431: 406:. Retrieved 383: 332: 325: 311: 309: 301: 282: 265: 261: 254: 230: 215: 209:October 2016 206: 195:Please help 190:verification 187: 162: 158: 155:feature gate 154: 151:feature flag 150: 146: 144: 129: 111: 78: 76: 61: 52: 41:Please help 33: 725:netflix.com 545:unlaunch.io 257:toggle debt 107:A/B testing 91:source code 771:Categories 756:2024-08-27 675:github.com 630:2013-10-10 598:flickr.net 526:2022-12-22 461:2016-09-14 408:2013-09-27 363:References 43:improve it 730:9 January 705:9 January 680:9 January 655:9 January 603:9 January 577:9 January 551:14 August 233:variables 417:cite web 341:See also 322:Adoption 140:software 55:May 2022 121:version 103:release 99:runtime 97:during 95:feature 47:sources 483:  241:blocks 161:, or 136:merge 732:2017 707:2017 682:2017 657:2017 605:2017 579:2017 553:2021 481:ISBN 423:link 125:test 318:). 248:or 199:by 89:in 81:in 773:: 749:. 723:. 698:. 673:. 647:. 596:. 569:. 543:. 518:. 419:}} 415:{{ 392:^ 382:. 371:^ 310:A 165:. 157:, 153:, 149:, 142:. 77:A 759:. 734:. 709:. 684:. 659:. 633:. 607:. 581:. 555:. 529:. 489:. 464:. 425:) 411:. 386:. 222:) 216:( 211:) 207:( 193:. 68:) 62:( 57:) 53:( 39:.

Index

self-published sources
improve it
sources
Learn how and when to remove this message
software development
feature branches
source code
feature
runtime
release
A/B testing
Continuous delivery
deployed to production continuously
version
test
user interface
merge
software

verification
improve this article
adding citations to reliable sources
Learn how and when to remove this message
variables
conditional statements
blocks
preprocessor directive
commented out
toggle debt
Miner's canary

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.