Knowledge

Feature toggle

Source 📝

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

Index

Canary release
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

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