▪ Delivering largescale cloud-based security
products @ CrowdStrike
▪ A founder of the Golang Bucharest Community
▪ Built several large-scale architectures in the
past, some processing >300M events per day
▪ linkedin.com/in/rcalin
Engineering Manager @ CrowdStrike
RADU CALIN
CROWDSTRIKE
4.
CROWDSTRIKE FACTS
CROWDSTRIKE
Protecting
44 ofFortune 100
Companies
37 of 100 Top Global
Companies
Company valued at
$20B
(CRWD on NASDAQ stock
market)
Growing
Revenue 90% Year over
Year
Team globally - fully
remote company
CrowdStrike Cloud
Ingesting
100s of billions of events
daily
Leveraging
100s of Microservices
10s of PBs of data storage
1000s of servers
On
Multiple cloud
environments
And multiple service
providers
CROWDSTRIKE
“A distributed, opensource search and analytics
engine for all types of data, including textual,
numerical, geospatial, structured, and
unstructured.” - elastic.co
ELASTIC ☺ FACTS
CROWDSTRIKE
Fixednumber of
shards once index
created
50 GB maximum
recommended
shard size
Data growth and
use-cases can
vary dramatically
9.
CROWDSTRIKE
USE CASE –PROCESSING
X (M) Hosts
25 data points per host
Mutable
indicators
metadata
1000 * X (M) Indicators
40 Indicators per DP
10.
CROWDSTRIKE
USE CASE –QUERYING
Falcon UI
Heavy aggregations
Gateway
Data dump
Queries scoped
by customer
Max Y (B) Indicators
per customer
{ }REST
Client
CROWDSTRIKE
LET’S BUILD OUROWN INDEX (POD) MANAGEMENT SYSTEM
SQL DB
Customer -> Pod
Memberships
S3 Bucket
JSON Data
Microservice
Data fetched by dedicated
client lib, memory cache included
Data dump
Autoprovision to
default index,
if needed
Events for a particular customer
Manual management
ES Cluster
ES Docs
CROWDSTRIKE
HOW IT WORKS– INITIAL STATE
ES Index X
Read*
Write
* Do not use ES as a source of truth! Unless… you do
Pod Management
Customer events
Get read,
write indices
22.
CROWDSTRIKE
HOW IT WORKS– NEW INDEX
ES Index Y
Read
Write
ES Index X
Customer events
Get read,
write indices
Pod Management
23.
CROWDSTRIKE
HOW IT WORKS– DUAL WRITE
ES Index Y
Set dual write for
customer Z to Index X
and Y
Read
Write
ES Index X
Customer events
Get read,
write indices
Pod Management
24.
CROWDSTRIKE
HOW IT WORKS– DUAL WRITE
ES Index Y
Write
Read
Write
ES Index X
Customer events
Get read,
write indices
Pod Management
25.
CROWDSTRIKE
HOW IT WORKS– SYNC INDICES
ES Index Y
POST _reindex*
* conflicts: proceed &
op_type: create
Read
WriteWrite
ES Index X
Customer events
Get read,
write indices
Pod Management
26.
CROWDSTRIKE
HOW IT WORKS– SYNC INDICES
ES Index Y
Reindex in progress2
1 Transaction, overwrites existing docs
2 Skips existing docs
Read
Write1
Write1
ES Index X
Customer events
Get read,
write indices
Pod Management
27.
CROWDSTRIKE
HOW IT WORKS– SYNC INDICES
ES Index Y
Reindex finished
(indices in sync)
Read
WriteWrite
ES Index X
Customer events
Get read,
write indices
Pod Management
28.
CROWDSTRIKE
HOW IT WORKS– SWITCH API READS
ES Index Y
Set reads to Index Y
Read
WriteWrite
ES Index X
Customer events
Get read,
write indices
Pod Management
29.
CROWDSTRIKE
HOW IT WORKS– SWITCH API READS
ES Index Y
Read
WriteWrite
ES Index X
Customer events
Get read,
write indices
Pod Management
30.
CROWDSTRIKE
HOW IT WORKS– CUT-OFF WRITES
Customer events
Remove writes from
Index X
ES Index Y
Read
Get read,
write indices
WriteWrite
ES Index X
Pod Management
31.
CROWDSTRIKE
HOW IT WORKS– CUT-OFF WRITES
ES Index Y
Read
Write
ES Index X
Customer events
Get read,
write indices
Pod Management
32.
CROWDSTRIKE
HOW IT WORKS- CLEANUP
ES Index Y
POST _delete_by_query
Read
Write
ES Index X
Customer events
Get read,
write indices
Pod Management
33.
STATS FROM ANACTUAL MIGRATION
CROWDSTRIKE
16 AWS
m4.4xlarge
data nodes
16 primary shards per index
1 replica per index
1 m refresh interval per index
230M primary
documents
90 GB of primary data
48 slices (best config)
4000 bulk size (best config)
40 minutes
@ 70% CPU
95K* index/s for
migration
130K* index/s for cluster
*primary indices