You are viewing content from a past/completed QCon

Presentation: CRDTs in Production

Track: Production Readiness: Building Resilient Systems

Location: Ballroom A

Duration: 2:55pm - 3:45pm

Day of week: Wednesday

Level: Intermediate - Advanced

Persona: Backend Developer, Developer

Share this on:

This presentation is now available to view on InfoQ.com

Watch video with transcript

What You’ll Learn

  1. Hear how PayPal developed a distributed system dealing with consistency issues.

  2. Find out what scenarios eventual consistency works for.

  3. Learn that eventual consistency is doable and why it matters.

Abstract

In search of scalability and availability improvements, many companies adopt eventual consistency as the consistency model underlying their stateful systems and persistent data stores. At the same time, software designers are focused on creating resilient systems ready to work in production with minimal complexity. Dmitry will share lessons learned in developing a distributed system based on an eventually consistent data store. The final solution utilizes conflict-free, replicated data types with causality tracking to achieve strong eventual consistency for critical data in multi-master, multi-datacenter DB (Aerospike) deployments.

Question: 

What's the focus of the work that you're doing today?

Answer: 

This project on CRDT was my first project at PayPal and I was part of PD platform team. This is a team on top of infrastructure which provides services which will be used by product development engineers. Our platform allows us to drive the product development aligned with existing infrastructure and at the same time, we need to be efficient in throughput and consistency. We designed this CRDT solution specifically for our situation for our partners and for our infrastructure current state. There is also a requirement how many dependencies we can afford. For example, why CRDT was a very good fit because we say that we don't know the configuration of the cluster. We don't know how many data centers they have. This immediately removed the possibility to use consensus protocols because consensus is based on n divided by 2 plus 1 nodes and we don't have this capability on the infrastructure side. From the box it means that we need to implement it but we don't know about infrastructure. That's why we tried to build a reliable solution on not very reliable components.

Question: 

What was the specific use case that you were solving?

Answer: 

We are talking about compliance statuses. This is something like whether you're verified, whether you can or cannot transact.

Question: 

Who is the core audience you're talking to?

Answer: 

I'm talking to product architects who build product solutions like services. They might live in cloud or on premise infrastructure, but they do not always have enough control, how many databases, how databases are shared, how the network is organized. This is the reality that we face today in most companies. You just have solutions. And if there is a spike on other databases we say 'We provide consistency for this and that, but for anything else, we do not provide it', and you need to have something reliable.

Question: 

So the reason why CRDT has made the most sense for PayPal is because you didn't have the exact number of the quorum because the infrastructure could change?

Answer: 

Exactly. And we also need remote deployment. This means that nodes should be able to work in isolation for some period of time. And if the majority of the cluster is not accessible for this node we should still be able to handle requests.

Question: 

Why is this talk in the production readiness track?

Answer: 

Because as product developers we want to be able to provide high quality of services, high availability regardless of what's going on in infrastructure. We want to achieve maximum efficiency with the components that we have today, and with the anticipation of what these components behavior might be.

Question: 

Is this an advanced or intermediate talk?

Answer: 

I would say this is an advanced talk.

Question: 

What do you want someone to walk away from this talk with?

Answer: 

First of all, I want someone to walk away knowing that eventual consistency is feasible. Recently I was in a FoundationDB talk, and somebody said that eventual consistency equals no consistency. I disagree with that. This is not easy. This has to be designed well and to think about the access patterns. It is not generic. It is very specific for some particular case. You need to have assessment of what the root cause of your concurrency issue is. But it is feasible and it allows you to avoid the issues resulting from network latency because I think that in the current scale and pace of interaction between people and technology synchronized solutions are very limited.

Speaker: Dmitry Martyanov

Software Engineer @PayPal

Software engineer at PayPal working with a focus on distributed systems and resilient architectures.

Find Dmitry Martyanov at

Tracks

  • Building & Scaling High-Performing Teams

    To have a high-performing team, everybody on it has to feel and act like an owner. Organizational health and psychological safety are foundational underpinnings to support ownership.

  • Evolving the JVM

    The JVM continues to evolve. We’ll look at how things are evolving. Covering Kotlin, Clojure, Java, OpenJDK, and Graal. Expect polyglot, multi-VM, performance, and more.

  • Trust, Safety & Security

    Privacy, confidentiality, safety and security: learning from the frontlines.

  • JavaScript & Transpiler/WebAssembly Track

    JavaScript is the language of the web. Latest practices for JavaScript development in and how transpilers are affecting the way we work. We’ll also look at the work being done with WebAssembly.

  • Living on the Edge: The World of Edge Compute From Device to Application Edge

    Applied, practical & real-world deep-dive into industry adoption of OS, containers and virtualization, including Linux on.

  • Software Supply Chain

    Securing the container image supply chain (containers + orchestration + security + DevOps).

  • Modern CS in the Real World

    Thoughts pushing software forward, including consensus, CRDT's, formal methods & probabilistic programming.

  • Tech Ethics: The Intersection of Human Welfare & STEM

    What does it mean to be ethical in software? Hear how the discussion is evolving and what is being said in ethics.

  • Optimizing Yourself: Human Skills for Individuals

    Better teams start with a better self. Learn practical skills for IC.

  • Modern Data Architectures

    Today’s systems move huge volumes of data. Hear how places like LinkedIn, Facebook, Uber and more built their systems and learn from their mistakes.

  • Practices of DevOps & Lean Thinking

    Practical approaches using DevOps and a lean approach to delivering software.

  • Microservices Patterns & Practices

    What's the last mile for deploying your service? Learn techniques from the world's most innovative shops on managing and operating Microservices at scale.

  • Bare Knuckle Performance

    Killing latency and getting the most out of your hardware

  • Architectures You've Always Wondered About

    Next-gen architectures from the most admired companies in software, such as Netflix, Google, Facebook, Twitter, & more

  • Machine Learning for Developers

    AI/ML is more approachable than ever. Discover how deep learning and ML is being used in practice. Topics include: TensorFlow, TPUs, Keras, PyTorch & more. No PhD required.

  • Production Readiness: Building Resilient Systems

    Making systems resilient involves people and tech. Learn about strategies being used from chaos testing to distributed systems clustering.

  • Regulation, Risk and Compliance

    With so much uncertainty, how do you bulkhead your organization and technology choices? Learn strategies for dealing with uncertainty.

  • Languages of Infrastructure

    This track explores languages being used to code the infrastructure. Expect practices on toolkits and languages like Cloudformation, Terraform, Python, Go, Rust, Erlang.