in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale Networks in Real-time
1. The Connection Game
How We Use Kinesis Streams to
Analyze Billions of Network Traffic
Flows in Real-Time
John Bennett, Cloud Network Engineering
Senior Software Engineer
2. ● 93 million customers
● Over 190 countries
● 37% of Internet traffic
● 125 million hours of video
Netflix is big
3. ● 100s of microservices
● 1,000s of deployments
● More than 100,000 instances
And complex
4. How do we optimize the design and
use of the network at scale in a
dynamic environment?
17. ● OLAP-style (Online Analytical Processing)
● Rollup
● ex. All apps deployed to the same region rollup to that region
● Drill down
● ex. Which apps deployed to a region generate the most traffic?
● Slicing and dicing
● ex. Which apps generate the most traffic in a region by day?
Queries
18. ● Large dataset (billions of events per day)
● Multiple dimensions and metrics
● Ad-hoc OLAP queries
● Fast aggregations
● Real-time
New source for network analytics
19. Dredge
Ingest
Network data from the entire system
Enrich
Traffic logs with application metadata
Aggregate
Multi-dimensional metrics
24. Given a VpcFlowLogEvent
{srcIP: 172.31.16.139, dstIP: 10.13.67.49, …}
Enriched with application metadata
{srcIP: 172.31.16.139, dstIP: 10.13.67.49, srcMetadata:
{app: foo}, dstMetadata: {app: bar},…}
Aggregated and indexed
App foo sent 426718 bytes to app bar today
25. Given a VpcFlowLogEvent
{srcIP: 172.31.16.139, dstIP: 10.13.67.49, …}
Enriched with application metadata
{srcIP: 172.31.16.139, dstIP: 10.13.67.49, srcMetadata:
{app: foo}, dstMetadata: {app: bar},…}
Aggregated and indexed
App bar received 8278392 bytes from apps foo and baz in
the last week
26. Given a VpcFlowLogEvent
{srcIP: 172.31.16.139, dstIP: 10.13.67.49, …}
Enriched with application metadata
{srcIP: 172.31.16.139, dstIP: 10.13.67.49, srcMetadata:
{app: foo}, dstMetadata: {app: bar},…}
Aggregated and indexed
App baz has outbound network dependencies on apps foo,
bar, etc.
38. ● Separation of concerns for reading and writing
● Changelog stream is a 1st class citizen
● Consume and join streams instead of querying DB
● Maintain materialized views
● Pre-computed cache
Unbundle the database
42. ● Integration with AWS services
● Kinesis Client Library (KCL)
● Auto-scaling for elastic throughput
● Total Cost of Ownership (TCO)
Kinesis Over Kafka
44. ● Worker per EC2 instance
○ Multiple record processors per worker
○ Record processor per shard
● Load balancing between workers
● Checkpointing (with DynamoDB)
● Stream- and shard-level metrics
Kinesis Client Library
45. VPC Flow Logs IncomingBytes per hour
Example account and region over 1 week
Elastic throughput
46. VPC Flow Logs IncomingBytes per minute
Example account and region over 3 hours
Elastic throughput
47. ● Very little operational overhead
○ Monitor stream metrics and DynamoDB table
○ Run and manage auto-scaling util
● No consultation from internal Kafka team
○ Capacity planning
○ Monitoring, failover, and replication
TCO
48. ● Per-shard limits
○ Increase shard count or fan out to other streams
● No log compaction
○ Up to 7-day max retention
○ Manual snapshots, increased complexity
○ Not ideal for changelog joins
Limitations
49. ● Kinesis enables us to focus
● Cross-account log sharing simplifies the system
● KCL does the boring stuff
● Auto-scaling improves efficiency
● Lower TCO
Ingest: Lessons
56. ● Hash table of sorted lists
● Key is IP, Value is metadata sorted by timestamp
● Recent updates (within capture window) or last
● Join with flow log events stream
Address Metadata Changelog