SlideShare a Scribd company logo
Building high performance microservices in
finance with Apache Thrift
Rethinking service APIs in a Cloud Native environment
Presenter
• Randy Abernethy
• ra@apache.org, randy.abernethy@rx-m.com
• Apache Thrift PMC
• RX-M Cloud Native Consulting Partner
• Author or the Programmer’s Guide to apache Thrift
What is Cloud Native?
• Microservice Oriented
• Container Packaged
• Dynamically Orchestrated
Needs Cloud Native Solutions Can Address:
• Extreme horizontal scale
• Increased server density
• Granular scaling
• Improved and explicit
modularity
• Support for aspirational
development processes
• CI/CD
• Agile development
• Everything as code/GitOps
• Support for rapid adoption of
new technologies
• Time to Innovation/Market
Cloud Native Adoption
• K8s saw 567% growth in commits in 2017 alone
• Google starts over 3,000 containers per second in
their Borg/Omega environment
• Pokemon Go, a 30,000 container cloud native
application running on Google Container Engine
Source: Docker Blog
Stack Overflow Trends
Container BContainer A
Contrasting Containers with VMs
H/W H/W
Hypervisor OS
VM A VM B
OS OS
App A App B
App A App B
Challenges created by a microservice approach
• Explosion in the number of
service instances to manage
• Extreme need for reliable
deployment
• Dramatically different debugging
and monitoring models
• Increased pressure on networks
to exchange procedure calls
Netflix Microservice “Death Star” Model
Modern RPC
• What is modern RPC?
• Cross platform
• Polyglot
• Evolvable
• Fast
• Monoliths are internally composed of
modules which call each other through
exposed functions/methods
• This model is easy to translate to RPC
style microservices
• The largest Internet Scale firms have all
adopted Modern RPC solutions internally
to improve service performance
• Google – ProtoBuf/Stubby
(now moving from Stubby to gRPC)
• Facebook – Thrift
• Twitter – Thrift/Scrooge/Finagle
1980 - Bruce Jay Nelson credited with inventing term RPC in early ARPANET documents
▪ The idea of treating network operations as procedure calls
1981 - Xerox Courier possibly the first commercial RPC system
1984 - Sun RPC (now Open Network Computing [ONC+] RPC, RFC 5531)
1991 - CORBA – Common Object Request Broker Architecture
▪ CORBA specification defines an ORB through which an application interacts with objects
▪ General Inter-ORB Protocol (GIOP) is the protocol by which ORBs communicate
▪ Internet InterORB Protocol (IIOP) implementation of the GIOP for use over the Internet
1993 - DCE RPC – open (designed by committee) RPC solution
▪ Integrated with the Distributed Computing Environment
▪ Packaged with distributed file system, network information system and other elements
1994 - MS RPC (a flavor of DCE RPC and the basis for DCOM)
1994 - Java RMI – a Java API that performs the object-oriented equivalent of remote
procedure calls (RPC), with support for direct transfer of serialized Java objects and
distributed garbage collection
▪ RMI-IIOP implements the RMI interface over CORBA
▪ Third party RMI implementations and wrappers are prevalent (e.g. Spring RMI)
1998 - SOAP (Simple Object Access Protocol) specifies a way to perform RPC using XML
over HTTP or Simple Mail Transfer Protocol (SMTP) for message negotiation and
transmission
2001 - Google Protocol Buffers – developed at Google to glue their servers together and
interoperate between their three official languages (C++/Java/Python, JavaScript and
others have since been added), used as a serialization scheme for custom RPC systems
2006 - Apache Thrift – developed at Facebook to solve REST performance problems and
to glue their servers together across many languages
▪ The basis for Twitter Finagle, a cornerstone of the Twitter platform
2008 - Apache Avro is a serialization framework designed to package the serialization
schema with the data serialized, packaged with Hadoop
2015 - Google gRPC announced as an RPC framework operating over http/2 using
protocol buffers for serialization
2017 - Google contributes gRPC to CNCF
Fast does not have to be hard
• To create an Apache
Thrift service, simply:
• Define it in IDL
• Generate client stubs
in your choice of
languages
• Generate a server
stub and wire it to
your implementation
• Use a prebuilt
Apache Thrift server
shell to implement
the service
Isn’t REST fast enough?
• For public, widely consumed
APIs, REST is very good,
leveraging the infrastructure of
the web
• For internal, high performance
APIs, REST, HTTP and JSON text
serialization can be slow and
there’s no “web infra” to
leverage
• The chart at right shows
seconds required for the same
client on the same computer to
call the same local service 1mm
times
• Each bar, uses a different tech
stack to implement the service
0 200 400 600 800 1000 1200 1400 1600
CPP->CPP
CPP->Go
Go->Go
Py->CPP
JS->CPP
Py->Go
PyAc->PyAc
CPP->JS
JS->JS
Py->Py
Go->Py
4 Clients 1 Client
Thrift Language Comparison
Thrift Local Loopback Test
Time to complete 1mm calls
Client (Cli->) to server (->Svr)
Performance in the backend
• gRPC
• ProtoBuf
• HTTP/2
• POST
• Thrift
• Compact Protocol
• TCP
0 50 100 150 200 250 300 350
Thrift CPP
Thrift Go
gRPC CPP
gRPC Go
gRPC/Thrift
4 clients 1 client
Local Loopback Test
Time to complete 1mm calls
API Tech / Language
Performance over the Internet
• The world wide web is the
largest distributed system
mankind has ever created
• Systems leveraging the protocols
of the Web (http/http/2) gain
many benefits at little or no cost
• Massively distributed caches
• Security appliances/technologies
• Gateways
• Load Balancers
• Etc.
• REST (and to some degree gRPC
and Thrift/Http) reap many of
these benefits Fielding, 2000
Thrift Web Benefits
• Because Apache Thrift supports plugable protocols Thrift can run over
HTTP, HTTP2 and WebSocket
• Making web integration easier
• Because Thrift supports XHR in the browser there is no need for a backend
gateway
• Apache Thrift browser based clients can make calls directly against Apache Thrift
services
• Gateway services should probably be interposed but they can have a lighter touch
• Apache Thrift offers THeaderTransport allowing users to sperate
application data (RPC payload) from platform metadata (Headers)
• Useful for context specific tracing, service mesh metadata, etc.
Service Mesh and Cross Cutting Concerns
• Writing applications services requires
domain knowledge
• Writing any service requires a host of
cross cutting concerns:
• Privacy
• Authentication
• Tracing
• Rate Limiting
• Load Balancing
• Discovery
• Health checks
• Etc.
• Modern service mesh technologies
handle the cross cutting concerns so
developers can focus on build
applications
• At the cost of increased latency
• Platforms like Istio have become
increasingly popular in cloud native
systems
Host A Host B
Pod Pod
Client
P
r
o
x
y
P
r
o
x
y
mTLS
Service
Mesh Control Plane
Istio
• A simple
Apache Thrift
test client
using:
• A K8s service
load balancing
a:
• Simple Apache
Thrift service
(k8s workload
pods)
Demo
Part I: Creating a Thrift microservice, containerizing it, orchestrating it
Part II: Managing cross cutting concerns and security in depth with a service mesh
Imagine we need to build a
service that tracks
OPEN SOURCE PROJECTS
https://github.com/RX-M/api-bench
Apache Thrift Take Away
• Key Features of Apache Thrift
• Servers and Serialization – a complete serialization and
service solution in tree
• Modularity – pluggable serialization protocols and
transports with a range of provided implementations
• Performance – light weight, scalable servers with fast
and efficient serialization
• Reach – support for an impressive range of languages,
protocols and platforms
• Rich IDL – language independent support for expressive
type and service abstractions
• Flexibility – integrated type and service evolution
features
• Community Driven Open Source – Apache Software
Foundation hosted and community managed
39% discount code: abernethydz
Good at Manning.com
Thank you!
Questions?

More Related Content

What's hot

HA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and Keepalived
Ganapathi Kandaswamy
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
VMware Tanzu
 
GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client	GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client
Gluster.org
 
gRPC Overview
gRPC OverviewgRPC Overview
gRPC Overview
Varun Talwar
 
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Cisco Canada
 
NATS Connect Live!
NATS Connect Live!NATS Connect Live!
NATS Connect Live!
NATS
 
Lenovo system management solutions
Lenovo system management solutionsLenovo system management solutions
Lenovo system management solutions
inside-BigData.com
 
Nginx
NginxNginx
Building layers of defense for your application
Building layers of defense for your applicationBuilding layers of defense for your application
Building layers of defense for your application
VMware Tanzu
 
gRPC in Go
gRPC in GogRPC in Go
gRPC in Go
Almog Baku
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
Knoldus Inc.
 
Introduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ ArtemisIntroduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ Artemis
Yoshimasa Tanabe
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
Kamesh Pemmaraju
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
SlideTeam
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
Brent Salisbury
 
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Red Hat Developers
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
Diego Pacheco
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
VMware Tanzu
 
Writing and testing high frequency trading engines in java
Writing and testing high frequency trading engines in javaWriting and testing high frequency trading engines in java
Writing and testing high frequency trading engines in java
Peter Lawrey
 

What's hot (20)

HA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and Keepalived
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client	GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client
 
gRPC Overview
gRPC OverviewgRPC Overview
gRPC Overview
 
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
Introducing Cisco HyperFlex Systems: The Next Generation in Complete Hypercon...
 
NATS Connect Live!
NATS Connect Live!NATS Connect Live!
NATS Connect Live!
 
Lenovo system management solutions
Lenovo system management solutionsLenovo system management solutions
Lenovo system management solutions
 
Nginx
NginxNginx
Nginx
 
Building layers of defense for your application
Building layers of defense for your applicationBuilding layers of defense for your application
Building layers of defense for your application
 
gRPC in Go
gRPC in GogRPC in Go
gRPC in Go
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Introduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ ArtemisIntroduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ Artemis
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
 
Writing and testing high frequency trading engines in java
Writing and testing high frequency trading engines in javaWriting and testing high frequency trading engines in java
Writing and testing high frequency trading engines in java
 

Similar to Building high performance microservices in finance with Apache Thrift

Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...
Andrés Colón Pérez
 
Adding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsAdding Real-time Features to PHP Applications
Adding Real-time Features to PHP Applications
Ronny López
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
Ranjan Baisak
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
GVNSK Sravya
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
University of Hawai‘i at Mānoa
 
Rpc framework
Rpc frameworkRpc framework
Rpc framework
july mon
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Mustafa AKIN
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
Web à Québec
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
Red Hat
 
KONG-APIGateway.pptx
KONG-APIGateway.pptxKONG-APIGateway.pptx
KONG-APIGateway.pptx
Agusto Sipahutar
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebservertarensi
 
Soap Standard
Soap StandardSoap Standard
Soap Standard
Kumar
 
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable InfrastructureNetflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Amer Ather
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 
Apache Thrift, a brief introduction
Apache Thrift, a brief introductionApache Thrift, a brief introduction
Apache Thrift, a brief introduction
Randy Abernethy
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
VMware Tanzu
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构
Benjamin Tan
 
WebRTC
WebRTCWebRTC
WebRTC
allanh0526
 

Similar to Building high performance microservices in finance with Apache Thrift (20)

Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...
 
Adding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsAdding Real-time Features to PHP Applications
Adding Real-time Features to PHP Applications
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Rpc framework
Rpc frameworkRpc framework
Rpc framework
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
 
KONG-APIGateway.pptx
KONG-APIGateway.pptxKONG-APIGateway.pptx
KONG-APIGateway.pptx
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver
 
Soap Standard
Soap StandardSoap Standard
Soap Standard
 
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable InfrastructureNetflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
Apache Thrift, a brief introduction
Apache Thrift, a brief introductionApache Thrift, a brief introduction
Apache Thrift, a brief introduction
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构
 
WebRTC
WebRTCWebRTC
WebRTC
 

Recently uploaded

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

Building high performance microservices in finance with Apache Thrift

  • 1. Building high performance microservices in finance with Apache Thrift Rethinking service APIs in a Cloud Native environment
  • 2. Presenter • Randy Abernethy • ra@apache.org, randy.abernethy@rx-m.com • Apache Thrift PMC • RX-M Cloud Native Consulting Partner • Author or the Programmer’s Guide to apache Thrift
  • 3. What is Cloud Native? • Microservice Oriented • Container Packaged • Dynamically Orchestrated
  • 4. Needs Cloud Native Solutions Can Address: • Extreme horizontal scale • Increased server density • Granular scaling • Improved and explicit modularity • Support for aspirational development processes • CI/CD • Agile development • Everything as code/GitOps • Support for rapid adoption of new technologies • Time to Innovation/Market
  • 5. Cloud Native Adoption • K8s saw 567% growth in commits in 2017 alone • Google starts over 3,000 containers per second in their Borg/Omega environment • Pokemon Go, a 30,000 container cloud native application running on Google Container Engine Source: Docker Blog Stack Overflow Trends
  • 6. Container BContainer A Contrasting Containers with VMs H/W H/W Hypervisor OS VM A VM B OS OS App A App B App A App B
  • 7. Challenges created by a microservice approach • Explosion in the number of service instances to manage • Extreme need for reliable deployment • Dramatically different debugging and monitoring models • Increased pressure on networks to exchange procedure calls Netflix Microservice “Death Star” Model
  • 8. Modern RPC • What is modern RPC? • Cross platform • Polyglot • Evolvable • Fast • Monoliths are internally composed of modules which call each other through exposed functions/methods • This model is easy to translate to RPC style microservices • The largest Internet Scale firms have all adopted Modern RPC solutions internally to improve service performance • Google – ProtoBuf/Stubby (now moving from Stubby to gRPC) • Facebook – Thrift • Twitter – Thrift/Scrooge/Finagle 1980 - Bruce Jay Nelson credited with inventing term RPC in early ARPANET documents ▪ The idea of treating network operations as procedure calls 1981 - Xerox Courier possibly the first commercial RPC system 1984 - Sun RPC (now Open Network Computing [ONC+] RPC, RFC 5531) 1991 - CORBA – Common Object Request Broker Architecture ▪ CORBA specification defines an ORB through which an application interacts with objects ▪ General Inter-ORB Protocol (GIOP) is the protocol by which ORBs communicate ▪ Internet InterORB Protocol (IIOP) implementation of the GIOP for use over the Internet 1993 - DCE RPC – open (designed by committee) RPC solution ▪ Integrated with the Distributed Computing Environment ▪ Packaged with distributed file system, network information system and other elements 1994 - MS RPC (a flavor of DCE RPC and the basis for DCOM) 1994 - Java RMI – a Java API that performs the object-oriented equivalent of remote procedure calls (RPC), with support for direct transfer of serialized Java objects and distributed garbage collection ▪ RMI-IIOP implements the RMI interface over CORBA ▪ Third party RMI implementations and wrappers are prevalent (e.g. Spring RMI) 1998 - SOAP (Simple Object Access Protocol) specifies a way to perform RPC using XML over HTTP or Simple Mail Transfer Protocol (SMTP) for message negotiation and transmission 2001 - Google Protocol Buffers – developed at Google to glue their servers together and interoperate between their three official languages (C++/Java/Python, JavaScript and others have since been added), used as a serialization scheme for custom RPC systems 2006 - Apache Thrift – developed at Facebook to solve REST performance problems and to glue their servers together across many languages ▪ The basis for Twitter Finagle, a cornerstone of the Twitter platform 2008 - Apache Avro is a serialization framework designed to package the serialization schema with the data serialized, packaged with Hadoop 2015 - Google gRPC announced as an RPC framework operating over http/2 using protocol buffers for serialization 2017 - Google contributes gRPC to CNCF
  • 9. Fast does not have to be hard • To create an Apache Thrift service, simply: • Define it in IDL • Generate client stubs in your choice of languages • Generate a server stub and wire it to your implementation • Use a prebuilt Apache Thrift server shell to implement the service
  • 10. Isn’t REST fast enough? • For public, widely consumed APIs, REST is very good, leveraging the infrastructure of the web • For internal, high performance APIs, REST, HTTP and JSON text serialization can be slow and there’s no “web infra” to leverage • The chart at right shows seconds required for the same client on the same computer to call the same local service 1mm times • Each bar, uses a different tech stack to implement the service
  • 11. 0 200 400 600 800 1000 1200 1400 1600 CPP->CPP CPP->Go Go->Go Py->CPP JS->CPP Py->Go PyAc->PyAc CPP->JS JS->JS Py->Py Go->Py 4 Clients 1 Client Thrift Language Comparison Thrift Local Loopback Test Time to complete 1mm calls Client (Cli->) to server (->Svr)
  • 12. Performance in the backend • gRPC • ProtoBuf • HTTP/2 • POST • Thrift • Compact Protocol • TCP 0 50 100 150 200 250 300 350 Thrift CPP Thrift Go gRPC CPP gRPC Go gRPC/Thrift 4 clients 1 client Local Loopback Test Time to complete 1mm calls API Tech / Language
  • 13. Performance over the Internet • The world wide web is the largest distributed system mankind has ever created • Systems leveraging the protocols of the Web (http/http/2) gain many benefits at little or no cost • Massively distributed caches • Security appliances/technologies • Gateways • Load Balancers • Etc. • REST (and to some degree gRPC and Thrift/Http) reap many of these benefits Fielding, 2000
  • 14. Thrift Web Benefits • Because Apache Thrift supports plugable protocols Thrift can run over HTTP, HTTP2 and WebSocket • Making web integration easier • Because Thrift supports XHR in the browser there is no need for a backend gateway • Apache Thrift browser based clients can make calls directly against Apache Thrift services • Gateway services should probably be interposed but they can have a lighter touch • Apache Thrift offers THeaderTransport allowing users to sperate application data (RPC payload) from platform metadata (Headers) • Useful for context specific tracing, service mesh metadata, etc.
  • 15. Service Mesh and Cross Cutting Concerns • Writing applications services requires domain knowledge • Writing any service requires a host of cross cutting concerns: • Privacy • Authentication • Tracing • Rate Limiting • Load Balancing • Discovery • Health checks • Etc. • Modern service mesh technologies handle the cross cutting concerns so developers can focus on build applications • At the cost of increased latency • Platforms like Istio have become increasingly popular in cloud native systems Host A Host B Pod Pod Client P r o x y P r o x y mTLS Service Mesh Control Plane
  • 16. Istio • A simple Apache Thrift test client using: • A K8s service load balancing a: • Simple Apache Thrift service (k8s workload pods)
  • 17. Demo Part I: Creating a Thrift microservice, containerizing it, orchestrating it Part II: Managing cross cutting concerns and security in depth with a service mesh Imagine we need to build a service that tracks OPEN SOURCE PROJECTS https://github.com/RX-M/api-bench
  • 18. Apache Thrift Take Away • Key Features of Apache Thrift • Servers and Serialization – a complete serialization and service solution in tree • Modularity – pluggable serialization protocols and transports with a range of provided implementations • Performance – light weight, scalable servers with fast and efficient serialization • Reach – support for an impressive range of languages, protocols and platforms • Rich IDL – language independent support for expressive type and service abstractions • Flexibility – integrated type and service evolution features • Community Driven Open Source – Apache Software Foundation hosted and community managed 39% discount code: abernethydz Good at Manning.com