SlideShare uma empresa Scribd logo
1 de 35
Large Scale Production Engineering
LSPE November 21st, 2013
by

Stephen Blum
CTO

PubNub
Friday, November 22, 13
https://github.com/pubnub
JavaScript, iPhone, Android, etc.

PubNub
Friday, November 22, 13
Traditional Way to Build Apps

CLIENT

REST / AJAX

PubNub
Friday, November 22, 13

SERVER
Moving to a Hybrid Model

CLIENT

REST / AJAX

PubNub
Friday, November 22, 13

SERVER
SOCKET
SERVER
Apps begin to “Push” for Majority of Data
Real-time Push

REST / AJAX

PubNub
Friday, November 22, 13
Some Philosophies

PubNub
Friday, November 22, 13
Parallel
Distributed
Globally Distributed

PubNub
Friday, November 22, 13
NO “BACKUPS”

PubNub
Friday, November 22, 13
Always Assume Failure

PubNub
Friday, November 22, 13
PubNub Real-time Network
14 Data Centers

Global Replication

3 Million Messages / Second

200 Million Devices / Month

< 1/4 Second Latency

1000s of Apps

Reliability

Performance

Service
Guarantee

PubNub
Friday, November 22, 13

Massive
Broadcast
The Definitive Leader in Real-Time
Powering 1000s of apps and streaming 3M messages a second to 200M devices a month
• Real-Time Collaboration

• 2nd Screen Sync

• Machine-to Machine Signaling

• Live Dashboards
• Multi-Player Games

• Real-Time Financial Streams
• Group Chat Rooms

• Real-Time Location Tracking
• Call Triggering
• Thousands more....

PubNub
Friday, November 22, 13
https://en.bitcoin.it/wiki/MtGox/API/Pubnub

PubNub
Friday, November 22, 13
PubNub
Friday, November 22, 13
PubNub
Friday, November 22, 13
Case Study: Rebtel
What is it?
World’s Second Largest VoIP Company
What does PubNub power?
All signaling to soft phones (iOS / Android)
Powers the new RebTel SDK (competitive with Twilio)
Value to Rebtel:

•

Time-to-Market: with PubNub, all focus on end user experience

•

Cost: dramatically reduced vs self-hosting 4-region, redundant set of data
centers

• Latency: fastest “time-to-ring” worldwide (each 500ms = lost revenue)

PubNub
Friday, November 22, 13
Case Study: Coca-Cola
Digital campaigns moving from banner ads to real-time experiences
• American Music Awards -- Red-carpet website allowing friends to chat
and annotate live video in real-time
• 2013 Superbowl -- Live voting and experience synchronization using
PubNub during the Cokechase.com campaign.
Value to Coke:
• Engagement -- Real-time campaigns drive dramatically longer consumer/
brand interaction than banners and other static digital campaigns
• Reliability -- in 2012 suffered 9-hour downtime due to spike load
• Scale -- Coke can’t rely on agencies or internal hosting for real-time expertise

PubNub
Friday, November 22, 13
Case Study: Tophatter
What is it?
Real-Time Auction site (eBay meets HSN)
What does PubNub power?
All user and bid interaction
Value to TopHatter:
• Redundancy: Multi-region needs redundancy for always-on
reliability. Other services dropped for 5-minute spans with no
explanation.
• Operational Efficiency: No need to host / maintain complex
real-time systems internally, using PubNub for cost of 0.5 headcount.

PubNub
Friday, November 22, 13
The Two Challenges of Real-Time
Development

Device Support

Network Protocols

Real-time Features

25% of the pain

Deployment
 
 
Scaling

Network topology
Firewalls
kernel configs
Compatibility

75% of the pain

PubNub
Friday, November 22, 13

Load testing
Security
Monitoring

Scaling
redundancy
load balancing
replication
failover
PubNub Stack
JavaScript - Client
C
Epoll vStable
Linux Kernel vStable

Friday, November 22, 13
It should be easy to Signal between devices.

PubNub
Friday, November 22, 13
Friday, November 22, 13
SEND  RECEIVE
// Publish
pubnub.publish({
channel : my_channel,
message : Hello!
});

// Subscribe
pubnub.subscribe({
channel : my_channel,
message : my_function
});

PubNub
Friday, November 22, 13
On application launch PubNub Negotiates an Always-ON TLS Socket with Client.

Customer Mobile and Web Clients
iOS

iOS
iOS

Subscribe Message
Channel “a” Stream

Customer Data Center
PubNub
Node

Node

Node

Node

Publish Message
Channel “a”
TLS/HTTPS Tunnel w/ AES256

Friday, November 22, 13

Node

Node

Node

iOS
iOS

iOS
iOS

PubNub

SSL

PubNub

SSL

PubNub Network

Message Publish
AES Encrypted Message Body

Node

Web

Android

PubNub

GeoIP lookup sends UDP Datagram List of IPs
Connects client to closest Data Center.

Open TLS/HTTPS Socket

GeoDNS

Open TLS/HTTPS Socket

GeoDNS Routes Mobile and Laptop Clients
to the nearest PubNub Network Data Center.

Open TLS/HTTPS Socket

PubNub Network

Message Envelope

PubNub
Data Center
1

PubNub
Data Center
2

PubNub
Data Center
3

PubNub
Data Center
... n
PubNub’s Real-Time Services
PubNub (Unicast)

PubNub (Multicast)

Data
Streams

Presence

Analytics

Storage/
Playback

Security

PubNub
Friday, November 22, 13

Mobile

Routing/
Filtering
Few Solved Challenges

PubNub
Friday, November 22, 13
TCP Socket State in Disagreement
=
Guaranteed 1 Second Lag

PubNub
Friday, November 22, 13
Existing connection:
client via reverse
proxy 1.2.3.4:50000

server 5.6.7.8:443
---ACK--
--ACK---

PubNub
Friday, November 22, 13
Client disconnects and the
proxy closes its connection to the server:
proxy 1.2.3.4:50000

server 5.6.7.8:443
---FIN--
--ACK---

PubNub
Friday, November 22, 13
The server does not process the socket close internally
while there is pending conn. The proxy eventually
times out and removes the half-closed connection.
proxy 1.2.3.4:50000
closed

server 5.6.7.8:443
half-closed

PubNub
Friday, November 22, 13
The proxy wishes to establish another connection to the
server and happens to pick the same ephemeral port.
This happens more frequently at high connection rates.
The
server transmits a probe ACK with the last known
sequence
number to verify the existing connection.
proxy 1.2.3.4:50000

server 5.6.7.8:443
---SYN--
--ACK---

PubNub
Friday, November 22, 13
The proxy receives the probe ACK and answers with a
RST.
The old connection is now closed on both sides.
proxy 1.2.3.4:50000

server 5.6.7.8:443
---RST--

PubNub
Friday, November 22, 13
After a 1 second timeout, the proxy retransmits the SYN
for
the new connection, which is now accepted by the server
side.
proxy 1.2.3.4:50000

server 5.6.7.8:443
---SYN--
-SYNACK---ACK--

PubNub
Friday, November 22, 13
On-going Challenges

PubNub
Friday, November 22, 13

Mais conteúdo relacionado

Destaque

SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...
SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...
SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...Sencha
 
SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...
SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...
SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...Sencha
 
Building with Watson - Advanced Integrations with Watson Conversation
Building with Watson - Advanced Integrations with Watson ConversationBuilding with Watson - Advanced Integrations with Watson Conversation
Building with Watson - Advanced Integrations with Watson ConversationIBM Watson
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsSencha
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Dev_Events
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...Sencha
 
Watson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIs
Watson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIsWatson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIs
Watson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIsIBM Watson
 
Building with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and ConversationBuilding with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and ConversationIBM Watson
 
Natural Language Classifier - Handbook (IBM)
Natural Language Classifier - Handbook (IBM)Natural Language Classifier - Handbook (IBM)
Natural Language Classifier - Handbook (IBM)Davi Couto
 
Application Developer Predictions 2017 - It's All About Cognitive
Application Developer Predictions 2017 - It's All About CognitiveApplication Developer Predictions 2017 - It's All About Cognitive
Application Developer Predictions 2017 - It's All About CognitiveIBM Watson
 
Building with Watson - Training and Preparing Your Conversational System
Building with Watson - Training and Preparing Your Conversational SystemBuilding with Watson - Training and Preparing Your Conversational System
Building with Watson - Training and Preparing Your Conversational SystemIBM Watson
 

Destaque (11)

SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...
SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...
SenchaCon 2016: Using Ext JS to Turn Big Data into Intelligence - Olga Petrov...
 
SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...
SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...
SenchaCon 2016: Using Ext JS 6 for Cross-Platform Development on Mobile - And...
 
Building with Watson - Advanced Integrations with Watson Conversation
Building with Watson - Advanced Integrations with Watson ConversationBuilding with Watson - Advanced Integrations with Watson Conversation
Building with Watson - Advanced Integrations with Watson Conversation
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
Watson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIs
Watson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIsWatson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIs
Watson DevCon 2016 - The Future of Discovery: Deep Insights with Cognitive APIs
 
Building with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and ConversationBuilding with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and Conversation
 
Natural Language Classifier - Handbook (IBM)
Natural Language Classifier - Handbook (IBM)Natural Language Classifier - Handbook (IBM)
Natural Language Classifier - Handbook (IBM)
 
Application Developer Predictions 2017 - It's All About Cognitive
Application Developer Predictions 2017 - It's All About CognitiveApplication Developer Predictions 2017 - It's All About Cognitive
Application Developer Predictions 2017 - It's All About Cognitive
 
Building with Watson - Training and Preparing Your Conversational System
Building with Watson - Training and Preparing Your Conversational SystemBuilding with Watson - Training and Preparing Your Conversational System
Building with Watson - Training and Preparing Your Conversational System
 

Mais de Chris Westin

Data torrent meetup-productioneng
Data torrent meetup-productionengData torrent meetup-productioneng
Data torrent meetup-productionengChris Westin
 
Ambari hadoop-ops-meetup-2013-09-19.final
Ambari hadoop-ops-meetup-2013-09-19.finalAmbari hadoop-ops-meetup-2013-09-19.final
Ambari hadoop-ops-meetup-2013-09-19.finalChris Westin
 
Cluster management and automation with cloudera manager
Cluster management and automation with cloudera managerCluster management and automation with cloudera manager
Cluster management and automation with cloudera managerChris Westin
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcacheChris Westin
 
SDN/OpenFlow #lspe
SDN/OpenFlow #lspeSDN/OpenFlow #lspe
SDN/OpenFlow #lspeChris Westin
 
cfengine3 at #lspe
cfengine3 at #lspecfengine3 at #lspe
cfengine3 at #lspeChris Westin
 
mongodb-aggregation-may-2012
mongodb-aggregation-may-2012mongodb-aggregation-may-2012
mongodb-aggregation-may-2012Chris Westin
 
Nimbula lspe-2012-04-19
Nimbula lspe-2012-04-19Nimbula lspe-2012-04-19
Nimbula lspe-2012-04-19Chris Westin
 
mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012Chris Westin
 
Stingray - Riverbed Technology
Stingray - Riverbed TechnologyStingray - Riverbed Technology
Stingray - Riverbed TechnologyChris Westin
 
MongoDB's New Aggregation framework
MongoDB's New Aggregation frameworkMongoDB's New Aggregation framework
MongoDB's New Aggregation frameworkChris Westin
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica setsChris Westin
 
Architecting a Scale Out Cloud Storage Solution
Architecting a Scale Out Cloud Storage SolutionArchitecting a Scale Out Cloud Storage Solution
Architecting a Scale Out Cloud Storage SolutionChris Westin
 
MongoDB: An Introduction - July 2011
MongoDB:  An Introduction - July 2011MongoDB:  An Introduction - July 2011
MongoDB: An Introduction - July 2011Chris Westin
 
Practical Replication June-2011
Practical Replication June-2011Practical Replication June-2011
Practical Replication June-2011Chris Westin
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011Chris Westin
 
Ganglia Overview-v2
Ganglia Overview-v2Ganglia Overview-v2
Ganglia Overview-v2Chris Westin
 

Mais de Chris Westin (20)

Data torrent meetup-productioneng
Data torrent meetup-productionengData torrent meetup-productioneng
Data torrent meetup-productioneng
 
Gripshort
GripshortGripshort
Gripshort
 
Ambari hadoop-ops-meetup-2013-09-19.final
Ambari hadoop-ops-meetup-2013-09-19.finalAmbari hadoop-ops-meetup-2013-09-19.final
Ambari hadoop-ops-meetup-2013-09-19.final
 
Cluster management and automation with cloudera manager
Cluster management and automation with cloudera managerCluster management and automation with cloudera manager
Cluster management and automation with cloudera manager
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
 
SDN/OpenFlow #lspe
SDN/OpenFlow #lspeSDN/OpenFlow #lspe
SDN/OpenFlow #lspe
 
cfengine3 at #lspe
cfengine3 at #lspecfengine3 at #lspe
cfengine3 at #lspe
 
mongodb-aggregation-may-2012
mongodb-aggregation-may-2012mongodb-aggregation-may-2012
mongodb-aggregation-may-2012
 
Nimbula lspe-2012-04-19
Nimbula lspe-2012-04-19Nimbula lspe-2012-04-19
Nimbula lspe-2012-04-19
 
mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012
 
Stingray - Riverbed Technology
Stingray - Riverbed TechnologyStingray - Riverbed Technology
Stingray - Riverbed Technology
 
MongoDB's New Aggregation framework
MongoDB's New Aggregation frameworkMongoDB's New Aggregation framework
MongoDB's New Aggregation framework
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
 
Architecting a Scale Out Cloud Storage Solution
Architecting a Scale Out Cloud Storage SolutionArchitecting a Scale Out Cloud Storage Solution
Architecting a Scale Out Cloud Storage Solution
 
FlashCache
FlashCacheFlashCache
FlashCache
 
Large Scale Cacti
Large Scale CactiLarge Scale Cacti
Large Scale Cacti
 
MongoDB: An Introduction - July 2011
MongoDB:  An Introduction - July 2011MongoDB:  An Introduction - July 2011
MongoDB: An Introduction - July 2011
 
Practical Replication June-2011
Practical Replication June-2011Practical Replication June-2011
Practical Replication June-2011
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
Ganglia Overview-v2
Ganglia Overview-v2Ganglia Overview-v2
Ganglia Overview-v2
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

PubNub Large Scale Production Engineering November 21st 2013

  • 1. Large Scale Production Engineering LSPE November 21st, 2013 by Stephen Blum CTO PubNub Friday, November 22, 13
  • 2. https://github.com/pubnub JavaScript, iPhone, Android, etc. PubNub Friday, November 22, 13
  • 3. Traditional Way to Build Apps CLIENT REST / AJAX PubNub Friday, November 22, 13 SERVER
  • 4. Moving to a Hybrid Model CLIENT REST / AJAX PubNub Friday, November 22, 13 SERVER SOCKET SERVER
  • 5. Apps begin to “Push” for Majority of Data Real-time Push REST / AJAX PubNub Friday, November 22, 13
  • 10. PubNub Real-time Network 14 Data Centers Global Replication 3 Million Messages / Second 200 Million Devices / Month < 1/4 Second Latency 1000s of Apps Reliability Performance Service Guarantee PubNub Friday, November 22, 13 Massive Broadcast
  • 11. The Definitive Leader in Real-Time Powering 1000s of apps and streaming 3M messages a second to 200M devices a month • Real-Time Collaboration • 2nd Screen Sync • Machine-to Machine Signaling • Live Dashboards • Multi-Player Games • Real-Time Financial Streams • Group Chat Rooms • Real-Time Location Tracking • Call Triggering • Thousands more.... PubNub Friday, November 22, 13
  • 15. Case Study: Rebtel What is it? World’s Second Largest VoIP Company What does PubNub power? All signaling to soft phones (iOS / Android) Powers the new RebTel SDK (competitive with Twilio) Value to Rebtel: • Time-to-Market: with PubNub, all focus on end user experience • Cost: dramatically reduced vs self-hosting 4-region, redundant set of data centers • Latency: fastest “time-to-ring” worldwide (each 500ms = lost revenue) PubNub Friday, November 22, 13
  • 16. Case Study: Coca-Cola Digital campaigns moving from banner ads to real-time experiences • American Music Awards -- Red-carpet website allowing friends to chat and annotate live video in real-time • 2013 Superbowl -- Live voting and experience synchronization using PubNub during the Cokechase.com campaign. Value to Coke: • Engagement -- Real-time campaigns drive dramatically longer consumer/ brand interaction than banners and other static digital campaigns • Reliability -- in 2012 suffered 9-hour downtime due to spike load • Scale -- Coke can’t rely on agencies or internal hosting for real-time expertise PubNub Friday, November 22, 13
  • 17. Case Study: Tophatter What is it? Real-Time Auction site (eBay meets HSN) What does PubNub power? All user and bid interaction Value to TopHatter: • Redundancy: Multi-region needs redundancy for always-on reliability. Other services dropped for 5-minute spans with no explanation. • Operational Efficiency: No need to host / maintain complex real-time systems internally, using PubNub for cost of 0.5 headcount. PubNub Friday, November 22, 13
  • 18. The Two Challenges of Real-Time Development Device Support Network Protocols Real-time Features 25% of the pain Deployment
  • 19.  
  • 20.   Scaling Network topology Firewalls kernel configs Compatibility 75% of the pain PubNub Friday, November 22, 13 Load testing Security Monitoring Scaling redundancy load balancing replication failover
  • 21. PubNub Stack JavaScript - Client C Epoll vStable Linux Kernel vStable Friday, November 22, 13
  • 22. It should be easy to Signal between devices. PubNub Friday, November 22, 13
  • 24. SEND RECEIVE // Publish pubnub.publish({ channel : my_channel, message : Hello! }); // Subscribe pubnub.subscribe({ channel : my_channel, message : my_function }); PubNub Friday, November 22, 13
  • 25. On application launch PubNub Negotiates an Always-ON TLS Socket with Client. Customer Mobile and Web Clients iOS iOS iOS Subscribe Message Channel “a” Stream Customer Data Center PubNub Node Node Node Node Publish Message Channel “a” TLS/HTTPS Tunnel w/ AES256 Friday, November 22, 13 Node Node Node iOS iOS iOS iOS PubNub SSL PubNub SSL PubNub Network Message Publish AES Encrypted Message Body Node Web Android PubNub GeoIP lookup sends UDP Datagram List of IPs Connects client to closest Data Center. Open TLS/HTTPS Socket GeoDNS Open TLS/HTTPS Socket GeoDNS Routes Mobile and Laptop Clients to the nearest PubNub Network Data Center. Open TLS/HTTPS Socket PubNub Network Message Envelope PubNub Data Center 1 PubNub Data Center 2 PubNub Data Center 3 PubNub Data Center ... n
  • 26. PubNub’s Real-Time Services PubNub (Unicast) PubNub (Multicast) Data Streams Presence Analytics Storage/ Playback Security PubNub Friday, November 22, 13 Mobile Routing/ Filtering
  • 28. TCP Socket State in Disagreement = Guaranteed 1 Second Lag PubNub Friday, November 22, 13
  • 29. Existing connection: client via reverse proxy 1.2.3.4:50000 server 5.6.7.8:443 ---ACK-- --ACK--- PubNub Friday, November 22, 13
  • 30. Client disconnects and the proxy closes its connection to the server: proxy 1.2.3.4:50000 server 5.6.7.8:443 ---FIN-- --ACK--- PubNub Friday, November 22, 13
  • 31. The server does not process the socket close internally while there is pending conn. The proxy eventually times out and removes the half-closed connection. proxy 1.2.3.4:50000 closed server 5.6.7.8:443 half-closed PubNub Friday, November 22, 13
  • 32. The proxy wishes to establish another connection to the server and happens to pick the same ephemeral port. This happens more frequently at high connection rates. The server transmits a probe ACK with the last known sequence number to verify the existing connection. proxy 1.2.3.4:50000 server 5.6.7.8:443 ---SYN-- --ACK--- PubNub Friday, November 22, 13
  • 33. The proxy receives the probe ACK and answers with a RST. The old connection is now closed on both sides. proxy 1.2.3.4:50000 server 5.6.7.8:443 ---RST-- PubNub Friday, November 22, 13
  • 34. After a 1 second timeout, the proxy retransmits the SYN for the new connection, which is now accepted by the server side. proxy 1.2.3.4:50000 server 5.6.7.8:443 ---SYN-- -SYNACK---ACK-- PubNub Friday, November 22, 13
  • 37. PubNub connects everyone Global Real-time Network PubNub Friday, November 22, 13