FeatureToggles: Dynamic
Configuration atWirex
I pay my way.
I pay by Wirex.
We give you the power to use your
money, your way, on one borderless
payment platform. Buy, store,
exchange and spend your digital or
traditional currencies, anytime,
anywhere.
First try
Expansion to clients
Growing inside
Feature Toggle
Example
Feature Toggles: First Try
if (FeatureAvailable(“OrderCard”))
ShowOrderCardButton( );
else
ShowWaitingListPage( );
Old Backend
Backend Workers
Azure Service Bus
API
Feature Toggles: First Try
Maintenance
200; false
GET /ismaintenance
200; true
500
ClientsAPI
Feature Toggles: First Try
Enabling
maintenance
IsMaintenance = true
DevOps
API
Config
Feature Toggles: First Try
Maintenance
as a Kill-Switch
Feature Toggles: First Try
if (IsUnderMaintenance)
ShowMaintenancePage( );
else
ShowHomePage( );
First try
Expansion to clients
Growing inside
Feature
Context
Feature name Enabled
True
False
“Exchange”
“Transfer”
Feature Toggles: Growing inside
Feature Context
• Email
• Country
• Verification Status
Feature Toggles: Growing inside
Features DB
Architecture
1
Feature Rule Set
1…n
Rules
1
1…n
Feature Toggles: Growing inside
Rule sets
Priority Name
100
Type Reason
10 000
20 000
Allow all
Allow all
Deny all
Allow
Allow
Deny
-
-
Unavailable
Feature Toggles: Growing inside
Rules
Value Property Operator
“UA” “Country” “Equals”
“autotest” “Email” “StartsWith”
Feature Toggles: Growing inside
Example
User
1
“UK”
User
2
“FR”
xV
Feature Toggles: Growing inside
Feature
Validation
Redis
API
DB
Backend
UserContext
Feature Toggles: Growing inside
Get Features:
Improvements
Features
Version hash
. . .
. . .
. . .
. . .
Feature Toggles: Growing inside
In – memory cache
API
Node 1
Node 2
Redis
Feature Toggles: Growing inside
Feature
validation
ClientsAPI
Configuration
Microservices
Workers
Feature Toggles: Growing inside
Validation
issue
time
Client
Request
Feature
changed
API
Validation
V x
Transactions
Validation
Feature Toggles: Growing inside
FiatAccount
Redis
Service
Redis
No
FA
Yes
Use Redis?
Feature Toggles: Growing inside
First try
Expansion to clients
Growing inside
Namespaces
backend.CardOrder
backend.tech.NewRedisClient
client.public.NewSignupFlow
Feature Toggles: Expansion to clients
Client
Features
Clients
GET /features
Configuration
1) Built in
2) Dynamic API Clients
Feature Toggles: Expansion to clients
Actions
Global actions
Object actions:
• Profile
• Accounts
• Cards
Feature Toggles: Expansion to clients
Global
Actions
GET /actions
Profile:
VerifyDocuments: “AlreadyDone”
ChangeCountry: “NotAllowed”
VerifyPhone: allowed
Feature Toggles: Expansion to clients
Evaluation
chains
IsFeatureAvailable
IsProfileVerified
IsNotNegativeBalance
Chain
Feature Toggles: Expansion to clients
Evaluation
chains
IsFeatureAvailable
IsProfileVerified
IsNotNegativeBalance
Chain
Reason:
Not available
Allowed: false
No
Feature Toggles: Expansion to clients
Change flow
GET /cards/{id}
Actions:
Validate: allowed
SetPIN: “NotAllowed”
LinkAccounts: “PinRequired”
Activate: “AccountsRequired”
Feature Toggles: Expansion to clients
Change flow
Actions:
Validate: “AlreadyDone”
SetPIN: allowed
LinkAccounts: “PinRequired”
Activate: “AccountsRequired”
Feature Toggles: Expansion to clients
GET /cards/{id}
Change flow
Actions:
Validate: allowed
SetPIN: “Notallowed”
LinkAccounts: “PinRequired”
Activate: “AccountsRequired”
Feature Toggles: Expansion to clients
GET /cards/{id}
Change flow
Actions:
Validate: “AlreadyDone”
SetPIN: “Notallowed”
LinkAccounts: “PinRequired”
Activate: “Allowed”
Feature Toggles: Expansion to clients
GET /cards/{id}
Validation
Validation
Back End
Clients
Validation
API
Feature Toggles: Expansion to clients
Actions
updating
Backend
Clients
disable
feature
AdminPanel
actions
updated
Feature Toggles: Expansion to clients
Планы на
Thank you!
https://wirexapp.com
facebook.com/WirexRnD/
career@wirexapp.com

.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex