Ether Cattle Initiative

## Cattle vs. Pets * Pets * Sentimental Value * Unique * Protected * Cattle * Economic Value * Generalized * Replaceable
## Servers as Pets * Configured by hand * One or two to serve a purpose * Survival of server is important * Often scaled to bigger servers * Effort expended supporting specific instances of a service
## Servers as Cattle * Provisioned automatically * A herd to serve the same purpose * Easily replaceable * Often scaled to more small servers * Losing one is inconsequential
## Ethereum Clients * Peer-to-peer services * Validate blocks / transactions * Hundreds of gigs of data * Must be synced with the blockchain
## Operational Challenges * Must maintain connections to peers * Heavy resource requirements to stay in sync * Hard to define "healthy" * Time consuming to replace
## Ethereum Nodes are Pets
## Alternatives * Hosted Services - Infura * Requires trust * Somebody else's pet * Light nodes
## Turning Ethereum Nodes into Cattle
## What about databases?
## Replication ![databases](./images/cattle-db.svg) * Master database node * Streaming replication * Load balanced read replicas
## How do we do that?
## Replicating Ethereum Nodes * Master * Replicas * Change Data Capture System
## Master Node * Maintains peer-to-peer connections * Validates blocks / transactions * Logs disk write operations to Kafka * Does **not** serve application requests * Still slightly pet-like
## Kafka * Real time, persistent streaming platform * Stores write operations from master * Serves write operations to connected replicas * Keeps write operations around for new replicas * Redundant servers
## Replica * No peer-to-peer connections * Receives write operations from Kafka * Applies writes to disk * Serves HTTP requests to application servers * Scales horizontally * Totally disposable
## Security Considerations * Only as trustworthy as the master + Kafka * Replicas **do not** validate blocks or transactions * Should not take streams from untrusted sources
## Status * [github.com/notegio/go-ethereum](https://github.com/notegio/go-ethereum) * Master / Change Data Capture — Implemented * Replica * Replication from Kafka * Strictly Disk-Driven Backend * RPC / IPC Implementation * Read-Only * No event subscriptions * Tested on private chain
## Operational Challenges * Kafka retention vs Replica snapshots * Disk consumption growth * Master still a single-point-of-failure (sort of)
## Future Work * Debugging * Write operations * Streamline operational process * Push upstream to core geth * Replicas to serve light clients
## How to Help * Try it! File bug reports. * Help operationalize processes * Conversations with the go-ethereum team
## Resources * [Architecture Document](./ethercattle.pdf) * [Github](https://github.com/notegio/go-ethereum)
## Next Time * 0x v2 Upgrade