+ Computes 100B + URL Hits eBay Scale at a Glance • 1.2 PB of logs collected just from web servers. • Does not include drop in deployments like Hadoop • Log volume of drop in solutions can easily be several PBs.
built with internal frameworks. • Internal PaaS provides lifecycle management for applications built on supported frameworks. • Internal Logging and Monitoring APIs provide ability to ship operational data.
manage applications that are widely used inside of eBay. • XaaS takes care of PDMR • Managed Ops provisions gear for other use-cases. • Developer manages DMR.
internal APIs to ship to centralized logging infrastructure when using frameworks. • Use open source or paid solutions for drop in deployments. • If everything fails… Do tail –f …. % tail -F /var/log/foo.log
any application on Tess. • Shipping logs should be as simple as writing to stdout/stderr. • Shipping metrics should be as simple as exposing an HTTP endpoint. • Provide an interface for users to view their logs/metrics/events. • Operations approved!!!
deploy any application with ease. • Each application has it’s own unique way of logging and generating metrics. • Pods are dynamic and can move around hosts. • Logs/Metrics need to be tagged with Pod metadata before shipping. • Ability to discover workloads needs to be present.
• Treat each line as a log message. • Parseable by a well defined GROK pattern. • Pass offset with each log message. • Ability to read JSON logs. • Ability to stitch stack traces. {"log":"2017/06/30 23:01:57 [I] Completed 10.64.244.96 - \"GET /kietu/ HTTP/1.0\" 404 Not Found 2931 bytes in 524us\n","stream":"stderr","time":"2017-06- 30T23:01:57.557914444Z"} {"log":"2017/06/30 23:01:57 [I] Completed 10.64.244.96 - \"GET /sf2k/ HTTP/1.0\" 404 Not Found 2931 bytes in 360us\n","stream":"stderr","time":"2017-06- 30T23:01:57.557918844Z"} root@localhost:/home/vija# tail -F /var/log/syslog Jul 29 07:17:01 tess-7829 CRON[6772]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Jul 29 08:17:01 tess-7829 CRON[6775]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) 28-Jul-2017 15:14:28.527 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8080]] org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:935) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
Extensible Configurable data destinations Beats Lightweight log tailer Handles JSON files Configurable multiline patterns Built in back pressure based on last offset shipped Filebeat Lightweight metric collector Modules understand how to collect metrics from various applications Metricbeat
to do metadata append. • Added metricbeat modules for Prometheus, Dropwizard. • Adopted Beats plugin support internally to manage eBay specific code. • For the rest we wrote…
Libbeat which provides discovery capabilities. • Can be started up in Filebeat/Metricbeat modes to collect logs/metrics. • Fits well into Kubernetes eco-system. • Can be extended to other discovery based environments as well. • Can even collect logs from inside containers!!!
to obtain metadata of deployed objects. • Builders build Beat configurations based on rules. • Appenders add additional parameters to Config objects. • RunnerFactory is used to deploy the generated configurations. Discoverer Discovery Endpoint Query Discovery Endpoint for metadata B1 B2 B3 B2 Pass Qualifying Metadata to Builders Builders A1 A2 A3 A4 Pass Generated Configs to Appenders RunnerFactory Input/Metricset Config
of what kind of metric the Pod would have and pattern to stitch stack traces. • Collectbeat listens to Kube API server for such annotations and spins up pollers to query metrics and prospectors to tail logs. annotations: io.collectbeat.metrics/type: "prometheus" io.collectbeat.metrics/endpoints: ":8080" io.collectbeat.metrics/namespace: "tess-apps" io.collectbeat.metrics/interval: "1m" io.collectbeat.logs/pattern: "^[0-9]{4}"
node. • Collectbeat uses Kube API server to discover workloads • Collected data is sent to internal monitoring system – Sherlock.io Collectbeat Deployment
on Beats plugins. • New http2 output plugin to ingest to Ingress APIs • Processors to manipulate standard Beat payloads into Ingress style payloads. • Custom Collectbeat Appenders to restructure fields as required by Ingress APIs.
50% YoY • Monitoring infrastructure expenditure usually is around 10% • Rogue logging can potentially kill the platform. • Checks and balances are essential.
shall be metered at host/pool level. • Applications based on Tier shall have: • Set Quotas • Set Retention • Any logs/metrics/events beyond ingest threshold shall be shed. • Limits shall be determined based on available CPU/Memory/Storage. • Provide autodiscover with metering information of every source being polled and stop modules after exceeding it’s quota.
can be established beyond which events can get sampled. • Beats would drop/retain messages based on configured conditions. • Maybe use `drop_events`, `include_lines`, `exclude_lines`
(QoS) is crucial for Tier 1 applications and state change signals. • Introduce Event Schedulers into the Beat pipeline. • Allow autodiscover to add “weights” to configurations. Producer Scheduler Weighted Fair Queue Message Queue
meets the needs of today. • Beats is a rapidly evolving community. • Vendor upgrades can become more and more cumbersome. • Move all of Collectbeat into autodiscovery. • Retire Collectbeat!!!
do it inside of Kubernetes then may be we could do it outside. • Package Beats with internal package manager. • Bundle package with OS image. • Beats will be omnipresent.
open sourced every day. • How do we keep up? • Community based development. • Go after formats and protocols > 100 applications supported out of the box!!!
Kubernetes clusters in eBay are managed by Beats. • No custom code running internally. • 40+ PRs to Elastic Beats repository. • Highest contributors to Beats outside of Elastic!! • In progess: • Packaging and deploying Beats outside of Kubernetes. • Merge of Collectbeat into autodiscovery. • QoS on libbeat