Kevin Reedy
@kevinreedy
[email protected]
http://tech.bellycard.com
Event Logging at Belly
!
Using fluentd to move logs into HDFS,
S3, and RabbitMQ
Slide 2
Slide 2 text
Event Logging at Belly @kevinreedy
What is Belly?
Slide 3
Slide 3 text
Event Logging at Belly @kevinreedy
Slide 4
Slide 4 text
The Nation’s Largest Loyalty Network
“From Sea To Shining Sea” - literally.
Tap into Belly’s nationwide network of millions of active Members and thousands of Merchant Partners.
Interact with more customers better.
Tens of Millions
Of Visits
Millions
Of Members
Thousands
Of Locations
Slide 5
Slide 5 text
Event Logging at Belly @kevinreedy
What is Belly?
•A digital customer loyalty platform
•One card or app for the entire network
•Over 2,000,000 members
•Over 8,000 merchants
•Over 15,000,000 visits
•Unique rewards
Slide 6
Slide 6 text
Event Logging at Belly @kevinreedy
Who is this Kevin guy
• Grew up “in Chicago”
• Networks and Telecom degree from DePaul
University
• Infrastructure Architect on the very small systems
team at Belly
• At Belly for a year
• Previously at Tap.Me, OpenDNS, Riverbed
Slide 7
Slide 7 text
Event Logging at Belly @kevinreedy
Event Logging
At Belly
Event Logging at Belly @kevinreedy
FluentD
•Open-source tool to collect events and
logs
•Code and Plugins written in Ruby
•Everything is JSON
•150+ plugins, including Hadoop, S3,
MongoDB, Elasticsearch
•Provides Disk and RAM Buffering
Slide 15
Slide 15 text
Event Logging at Belly @kevinreedy
Bee
•Data Validation and Sanitization
Service
•Written in Ruby
•Rules are defined in YAML
•Events from untrusted sources must
first pass through Bee
•This includes mobile clients
Slide 16
Slide 16 text
Event Logging at Belly @kevinreedy
Bee
Slide 17
Slide 17 text
Event Logging at Belly @kevinreedy
Putting it all together
Slide 18
Slide 18 text
Event Logging at Belly @kevinreedy
API Layer
•API Servers and Bee Servers run
Fluentd locally
•Fast response time
•Buffering locally if there are issues
•Fluentd also has a UDP input if you’d
rather have best effort delivery
Slide 19
Slide 19 text
Event Logging at Belly @kevinreedy
API ➡ Aggregation Layer
• Each API Fluentd instance forwards to two sets of
servers:
• Fluentd aggregators in Chicago
• Fluentd aggregators in EC2 us-east-1
• Currently each aggregator set is 2 hosts
• API Fluentd instances treat each aggregation set as
Master/Master, but this is configurable
Slide 20
Slide 20 text
Event Logging at Belly @kevinreedy
Aggregation Layer
•Limits the number of connections to
Output Layer
•Provides disk buffering for S3 and HDFS
Outputs
•Provides minimal buffering for
RabbitMQ Outputs
Event Logging at Belly @kevinreedy
Applications
•Ad-hoc queries in Hive
•Hiverunner
•User Facts Service
•Honey Reports
•Checkins Map
Slide 23
Slide 23 text
Event Logging at Belly @kevinreedy
Honey Reports
Slide 24
Slide 24 text
Event Logging at Belly @kevinreedy
Honey Reports
Slide 25
Slide 25 text
Event Logging at Belly @kevinreedy
Checkins Map
Slide 26
Slide 26 text
Event Logging at Belly @kevinreedy
Future Plans
•Evaluate using RabbitMQ as the
Aggregation Layer
•Application Logs as an Input
•Splunk or Elasticsearch / Kibana as
Outputs
Slide 27
Slide 27 text
Event Logging at Belly @kevinreedy
Questions?
!
!
…if there is time
Slide 28
Slide 28 text
Event Logging at Belly @kevinreedy
Keep in touch
•twitter: @kevinreedy
•email: [email protected]
•internets: http://tech.bellycard.com