In Jan 2012, Zynga was kind enough to invite me to speak at their SF office. These are the slides I presented; its much of the same SPDY content, although starting to focus more on mobile.
University of Delaware - Improving Web Protocols (early SPDY talk)Mike Belshe
?
SPDY is a protocol developed by Google to improve web performance by addressing latency and security issues on the web. It allows for multiplexing of requests over a single TCP connection to reduce round trips and connection overhead. Initial testing showed SPDY reduced page load times by 40% on average compared to HTTP. Google has deployed SPDY internally and it is enabled by default in Chrome, but more work is still needed for full standardization and deployment.
This document discusses the architecture of Zing Me's web chat platform. It has over 45 million registered users and handles over 500 servers. The web chat uses a connection server implemented in C++ with epoll to handle over 100,000 concurrent connections through long polling. It also uses a friend online server and message server. The message server stores messages and notifies of new messages through queues. Workers then deliver messages to users via the connection server. The architecture was developed over several months by multiple teams to provide real-time messaging capabilities at scale for Zing Me.
The document discusses email server and hosting plans offered by NS Web Bangalore. It states that NS Web uses SMTP and POP3 servers to support outgoing and incoming emails respectively. The email servers are located globally and have antivirus and spam filtering enabled. Various hosting plans like Silver, Gold, and Platinum are described that differ in features such as disk space, email accounts, and programming language support. Testimonials from satisfied customers praising NS Web's services are also included.
The document discusses how to build a system that can handle high access requests. It covers optimizing performance at the node level and scaling to multiple nodes. It then discusses various problems that can occur at different levels, from the client to the server to cross-server, and provides solutions for issues like caching, load balancing, and communication between servers. The overall goal is to understand where bottlenecks can occur and how to optimize each component to build a scalable system that can handle high traffic loads.
Zingme practice for building scalable website with PHPChau Thanh
?
This document discusses best practices for building scalable PHP websites, as demonstrated by ZingMe's architecture. It describes how ZingMe uses a scale-out approach with load balancing, centralized session storage, and an automated code deployment system. The key aspects covered are load balancing with HAProxy, overriding PHP's session handling to use Memcached, and configuring servers identically through version control and scripts. The goal is to gracefully handle increasing traffic by adding commodity servers within 5 minutes while maintaining a consistent environment.
The document summarizes Zing's technical architecture and job opportunities. It discusses Zing's products and usage statistics, as well as the technical stack including servers, programming languages, databases, caching, and real-time and detection systems. It also outlines open developer and designer positions working with technologies like PHP, Java, C++, and benefits like learning opportunities and compensation.
The document discusses the limitations of HTTP for building interactive real-time web applications and introduces WebSockets as an alternative. It explains that WebSockets allow for asynchronous, bidirectional communication over a single TCP connection, unlike HTTP which is stateless and half-duplex. The document also outlines the Java API for WebSockets (JSR 356) and provides examples of how WebSockets can be used for applications like chat, games, and social networking.
This document summarizes a presentation about building web services for mobile applications using RESTful APIs with PHP and the CakePHP framework. It introduces REST and SOAP web services and mobile interactions. It recommends REST design guidelines and tutorials for learning REST. It also discusses implementing a basic RESTful API with CakePHP, including enabling JSON responses, using the RequestHandlerComponent, and forcing default views to render JSON. The presentation encourages applying these skills to a personal project and continuing studies in cloud services and mobile integration.
NATS is a simple, secure, scalable, and high-performance messaging system for cloud native applications. It uses a text-based protocol and is written in Go, making it scalable and high-performing. The system supports pub/sub and request-reply messaging through subject-based routing and wildcards, allowing for flexible messaging patterns.
The document summarizes updates from the PHP community in May 2016, including:
- Security patches released for PHP versions 7.0.7, 5.6.22, and 5.5.36 that should be upgraded.
- An ImageMagick remote code execution vulnerability was announced along with mitigation recommendations.
- Upcoming new features for PHP 7.1 like array destructuring assignment syntax and nullable types.
- Updates released for various CMS's and frameworks including Drupal 8.1.1, WordPress 4.5.2, Slim 3.4, CakePHP 3.2.9-3.2.10, Laravel 5.2.32-5.
This document discusses Memcached, a distributed caching system that stores data and objects in memory for fast access. It can be used to cache database queries, API responses, and other computationally expensive operations. Memcached is an in-memory key-value store that uses a simple client-server architecture over TCP/IP or UDP. It allows storing and retrieving arbitrary data (strings, objects) indexed by keys.
This document summarizes a presentation about designing systems to handle high loads when Chuck Norris is your customer. It discusses scaling architectures vertically and horizontally, RESTful principles, using NoSQL databases like MongoDB, caching with Memcached, search engines like Sphinx, video/image storage, and bandwidth management. It emphasizes that the right technology depends on business needs, and high-load systems require robust architectures, qualified developers, and avoiding single points of failure.
The document provides information about web services and mobile applications. It discusses:
- Old style web services using SOAP and WSDL to define interfaces and interactions. Newer RESTful web services use HTTP methods and URI patterns instead of WSDL.
- Examples of building RESTful web APIs to store high scores from a mobile game app and retrieving leaderboards. The APIs were implemented with PHP and hosted on OpenShift.
- Suggestions for small practice projects like building web services for simple functions like hello world and converting temperatures, then calling them from mobile apps. Code examples and resources are provided.
Design a scalable site: Problem and solutionsChau Thanh
?
The document discusses designing a scalable site and addresses problems and solutions at each level, including:
1. Optimizing performance at the node level and scaling across multiple nodes either vertically (scale up) or horizontally (scale out).
2. Common client-side problems like optimizing static content delivery and caching, as well as issues delivering content from the client to internet service providers (ISPs).
3. Scaling challenges include problems routing traffic within ISPs and between ISPs/data centers, as well as optimizing server hardware, operating systems, applications and handling communication across servers.
What we can learn from CDNs about Web Development, Deployment, and PerformanceFastly
?
CDNs provide caching and delivery of web content but are often misused. CDNs can cache more dynamic content than typically done and improve performance. Precise measurement is still difficult, such as determining cache hit rates and impacts of memory versus disk hits. Overall, CDNs have more potential for optimization and caching improvements remain an ongoing challenge.
Experience lessons from architecture of zalo real time systemZalo_app
?
Zalo is a messaging application with over 3 million users that exchanges 30 million messages per day. It uses a real-time system architecture with connection servers that allow for 1 million concurrent connections and 200,000 messages per second. The architecture is broken into independent layers including load balancing, web servers, searching, databases, and connection servers that use technologies like C/C++, Java, and event-based I/O. Lessons learned include avoiding HTTP long polling, optimizing for large not small data, and developing a custom memory allocator to avoid fragmentation issues.
Domain transfer,domain transfer service in bangaloreNS Web Technology
?
Lets imagine your have booked your domain name with someone and feeling helpless with there no response calls or support to maintenance. At NS Web Bangalore we offer domain name transferring service with assurance in the process of easy migration with risk free and after-transfer seamless back-end support.
Process we follow for domain transfer is universal and begins with requisition for authorized code initiation of transfer process by maintaining guidelines & standards offer varied tools & services backed by round the clock customer service.
Comet: an Overview and a New Solution Called JabbifyBrian Moschel
?
Brian Moschel delivered this talk at the JS.Chi() April 2009 meetup. This talk provides an overview of Comet, also known as HTTP Push, covering how it works on the server and client, several implementation options, and using a new Comet API called Jabbify in an interactive demo.
Predicting user activity to make the web fast presentationJustin Dorfman
?
This document discusses techniques for predicting user activity and prerendering web pages to improve page load times. It notes current median page load times of 2.3-4.3 seconds and proposes using idle time between user actions like typing a URL to prefetch and render pages the user is likely to navigate to next based on their browsing history and habits. The document outlines Google Chrome's implementation of this using the omnibox search suggestions to predict and prerender likely future pages, showing how it has resulted in over 15% of omnibox navigations being nearly instant by preloading pages. It encourages web developers to ensure their sites can support prerendering.
This document provides an introduction to Node.js, including what it is, what it is good for, its core modules, and some basic JavaScript concepts. Node.js is an evented I/O JavaScript runtime built on V8 that uses an asynchronous and non-blocking I/O model. It is lightweight and good for building networked applications, streaming data, and event-driven real-time apps. Its core modules include HTTP, TCP, DNS, filesystems, and crypto. The document also covers JavaScript types, functions, closures, classes, and try/catch blocks.
SPA2015: Hooman Beheshti C The Future of CDNsFastly
?
Fastly VP of Technology Hooman Beheshti gives a keynote on The Future of CDNs at Software Practice Advancement Conference 2015.
More resources: http://spaconference.org/spa2015/uploads/resources/SPA%202015%20KEYNOTE%20AND%20DIVERSIONS.pdf
Scaling WordPress - Project Lana WordPress TeamDat Hoang
?
How we scale WordPress Multisite to server millions of users - by Project Lana WordPress Team - http://projectlana.com
Meetup: http://www.meetup.com/Saigon-WordPress/events/178972202/
Interview: http://www.meetup.com/Saigon-WordPress/messages/boards/thread/44232232
The document discusses using Fluentd to collect raw logs. It describes how the basic method uses in_tail and out_file plugins, but that traditional systems require raw logs. The fluent-agent-lite and fluent-plugin-file-alternative plugins are introduced as ways to collect and output raw logs with Fluentd while maintaining high performance and throughput. Configuration examples are provided for using these plugins to output raw logs to files.
SPDY was created by Google in 2009 to speed up web content delivery. It aims to reduce page load times by 50% by allowing multiple concurrent HTTP requests over a single TCP connection using features like request multiplexing, prioritization, and header compression. Some implementations of SPDY include Chrome, Firefox, and Amazon Kindle Fire. While it provides benefits, SPDY may not completely replace HTTP due to limitations like preventing single header extraction and potential for wasted server resources.
Keeping the Internet Fast and Resilient for You and Your CustomersCloudflare
?
Many of the most common uses of the Internet today weren¨t envisioned when it was created. In many ways, the success of the Internet and the TCP/IP protocol once envisioned by DARPA is pushing it to the limits. As a result, ensuring high-performance for end-users is complicated. Join Cloudflare experts for a talk that will describe the depth of these problems -- ranging from how routing breaks, to how shortage of IP space (under IPv4) hurts performance, to route leaks -- and how these issues lead to congestion and poor performance. They'll also discuss an approach to solving these challenges given the constraints.
This document summarizes topics that may be covered on a CS144 review session exam, including testing simultaneous open connections in TCP, logistics of the exam, sample exam questions and explanations, an overview of protocols like TCP, IP, and DNS, and concepts related to routing, physical layer transmission, and more. Sample exam questions are provided to illustrate the level of detail and reasoning expected in answers.
This document summarizes a presentation about building web services for mobile applications using RESTful APIs with PHP and the CakePHP framework. It introduces REST and SOAP web services and mobile interactions. It recommends REST design guidelines and tutorials for learning REST. It also discusses implementing a basic RESTful API with CakePHP, including enabling JSON responses, using the RequestHandlerComponent, and forcing default views to render JSON. The presentation encourages applying these skills to a personal project and continuing studies in cloud services and mobile integration.
NATS is a simple, secure, scalable, and high-performance messaging system for cloud native applications. It uses a text-based protocol and is written in Go, making it scalable and high-performing. The system supports pub/sub and request-reply messaging through subject-based routing and wildcards, allowing for flexible messaging patterns.
The document summarizes updates from the PHP community in May 2016, including:
- Security patches released for PHP versions 7.0.7, 5.6.22, and 5.5.36 that should be upgraded.
- An ImageMagick remote code execution vulnerability was announced along with mitigation recommendations.
- Upcoming new features for PHP 7.1 like array destructuring assignment syntax and nullable types.
- Updates released for various CMS's and frameworks including Drupal 8.1.1, WordPress 4.5.2, Slim 3.4, CakePHP 3.2.9-3.2.10, Laravel 5.2.32-5.
This document discusses Memcached, a distributed caching system that stores data and objects in memory for fast access. It can be used to cache database queries, API responses, and other computationally expensive operations. Memcached is an in-memory key-value store that uses a simple client-server architecture over TCP/IP or UDP. It allows storing and retrieving arbitrary data (strings, objects) indexed by keys.
This document summarizes a presentation about designing systems to handle high loads when Chuck Norris is your customer. It discusses scaling architectures vertically and horizontally, RESTful principles, using NoSQL databases like MongoDB, caching with Memcached, search engines like Sphinx, video/image storage, and bandwidth management. It emphasizes that the right technology depends on business needs, and high-load systems require robust architectures, qualified developers, and avoiding single points of failure.
The document provides information about web services and mobile applications. It discusses:
- Old style web services using SOAP and WSDL to define interfaces and interactions. Newer RESTful web services use HTTP methods and URI patterns instead of WSDL.
- Examples of building RESTful web APIs to store high scores from a mobile game app and retrieving leaderboards. The APIs were implemented with PHP and hosted on OpenShift.
- Suggestions for small practice projects like building web services for simple functions like hello world and converting temperatures, then calling them from mobile apps. Code examples and resources are provided.
Design a scalable site: Problem and solutionsChau Thanh
?
The document discusses designing a scalable site and addresses problems and solutions at each level, including:
1. Optimizing performance at the node level and scaling across multiple nodes either vertically (scale up) or horizontally (scale out).
2. Common client-side problems like optimizing static content delivery and caching, as well as issues delivering content from the client to internet service providers (ISPs).
3. Scaling challenges include problems routing traffic within ISPs and between ISPs/data centers, as well as optimizing server hardware, operating systems, applications and handling communication across servers.
What we can learn from CDNs about Web Development, Deployment, and PerformanceFastly
?
CDNs provide caching and delivery of web content but are often misused. CDNs can cache more dynamic content than typically done and improve performance. Precise measurement is still difficult, such as determining cache hit rates and impacts of memory versus disk hits. Overall, CDNs have more potential for optimization and caching improvements remain an ongoing challenge.
Experience lessons from architecture of zalo real time systemZalo_app
?
Zalo is a messaging application with over 3 million users that exchanges 30 million messages per day. It uses a real-time system architecture with connection servers that allow for 1 million concurrent connections and 200,000 messages per second. The architecture is broken into independent layers including load balancing, web servers, searching, databases, and connection servers that use technologies like C/C++, Java, and event-based I/O. Lessons learned include avoiding HTTP long polling, optimizing for large not small data, and developing a custom memory allocator to avoid fragmentation issues.
Domain transfer,domain transfer service in bangaloreNS Web Technology
?
Lets imagine your have booked your domain name with someone and feeling helpless with there no response calls or support to maintenance. At NS Web Bangalore we offer domain name transferring service with assurance in the process of easy migration with risk free and after-transfer seamless back-end support.
Process we follow for domain transfer is universal and begins with requisition for authorized code initiation of transfer process by maintaining guidelines & standards offer varied tools & services backed by round the clock customer service.
Comet: an Overview and a New Solution Called JabbifyBrian Moschel
?
Brian Moschel delivered this talk at the JS.Chi() April 2009 meetup. This talk provides an overview of Comet, also known as HTTP Push, covering how it works on the server and client, several implementation options, and using a new Comet API called Jabbify in an interactive demo.
Predicting user activity to make the web fast presentationJustin Dorfman
?
This document discusses techniques for predicting user activity and prerendering web pages to improve page load times. It notes current median page load times of 2.3-4.3 seconds and proposes using idle time between user actions like typing a URL to prefetch and render pages the user is likely to navigate to next based on their browsing history and habits. The document outlines Google Chrome's implementation of this using the omnibox search suggestions to predict and prerender likely future pages, showing how it has resulted in over 15% of omnibox navigations being nearly instant by preloading pages. It encourages web developers to ensure their sites can support prerendering.
This document provides an introduction to Node.js, including what it is, what it is good for, its core modules, and some basic JavaScript concepts. Node.js is an evented I/O JavaScript runtime built on V8 that uses an asynchronous and non-blocking I/O model. It is lightweight and good for building networked applications, streaming data, and event-driven real-time apps. Its core modules include HTTP, TCP, DNS, filesystems, and crypto. The document also covers JavaScript types, functions, closures, classes, and try/catch blocks.
SPA2015: Hooman Beheshti C The Future of CDNsFastly
?
Fastly VP of Technology Hooman Beheshti gives a keynote on The Future of CDNs at Software Practice Advancement Conference 2015.
More resources: http://spaconference.org/spa2015/uploads/resources/SPA%202015%20KEYNOTE%20AND%20DIVERSIONS.pdf
Scaling WordPress - Project Lana WordPress TeamDat Hoang
?
How we scale WordPress Multisite to server millions of users - by Project Lana WordPress Team - http://projectlana.com
Meetup: http://www.meetup.com/Saigon-WordPress/events/178972202/
Interview: http://www.meetup.com/Saigon-WordPress/messages/boards/thread/44232232
The document discusses using Fluentd to collect raw logs. It describes how the basic method uses in_tail and out_file plugins, but that traditional systems require raw logs. The fluent-agent-lite and fluent-plugin-file-alternative plugins are introduced as ways to collect and output raw logs with Fluentd while maintaining high performance and throughput. Configuration examples are provided for using these plugins to output raw logs to files.
SPDY was created by Google in 2009 to speed up web content delivery. It aims to reduce page load times by 50% by allowing multiple concurrent HTTP requests over a single TCP connection using features like request multiplexing, prioritization, and header compression. Some implementations of SPDY include Chrome, Firefox, and Amazon Kindle Fire. While it provides benefits, SPDY may not completely replace HTTP due to limitations like preventing single header extraction and potential for wasted server resources.
Keeping the Internet Fast and Resilient for You and Your CustomersCloudflare
?
Many of the most common uses of the Internet today weren¨t envisioned when it was created. In many ways, the success of the Internet and the TCP/IP protocol once envisioned by DARPA is pushing it to the limits. As a result, ensuring high-performance for end-users is complicated. Join Cloudflare experts for a talk that will describe the depth of these problems -- ranging from how routing breaks, to how shortage of IP space (under IPv4) hurts performance, to route leaks -- and how these issues lead to congestion and poor performance. They'll also discuss an approach to solving these challenges given the constraints.
This document summarizes topics that may be covered on a CS144 review session exam, including testing simultaneous open connections in TCP, logistics of the exam, sample exam questions and explanations, an overview of protocols like TCP, IP, and DNS, and concepts related to routing, physical layer transmission, and more. Sample exam questions are provided to illustrate the level of detail and reasoning expected in answers.
Web performance optimization - MercadoLibrePablo Moretti
?
The document provides techniques and tools for improving web performance. It discusses how reducing response times can directly impact revenues and user experience. It then covers various ways to optimize the frontend, including reducing time to first byte through DNS optimization and caching, using content delivery networks, HTTP compression, keeping connections alive, parallel downloads, and prefetching. It also discusses optimizing images, JavaScript loading, and introducing new formats like WebP. The overall document aims to educate on measuring and enhancing web performance.
The document discusses techniques for improving web performance, including reducing time to first byte, using content delivery networks and HTTP compression, caching resources, keeping connections alive and reducing request sizes. It also covers optimizing images, loading JavaScript asynchronously to avoid blocking, and prefetching content. The overall goal is to reduce page load times and improve user experience.
The document discusses SPDY, an evolution of HTTP developed by Google since 2009 that aims to speed up web content delivery. SPDY utilizes a single TCP connection more efficiently through multiplexing and other techniques. It allows for faster page loads, often around 39-55% faster than HTTP. While SPDY adoption is growing, with support in Chrome, Firefox, and Amazon Silk, widespread implementation by servers is still limited. SPDY is expected to influence the development of HTTP 2.0.
This document summarizes Gareth Llewellyn's experience redesigning the network architecture at DataSift to improve performance and scalability. The initial Cisco-based design suffered from issues like buffering, head of line blocking, and oversubscription of uplinks. Gareth considered moving to an Arista leaf-spine architecture with Arista 7050 core switches and 7048 top-of-rack switches, which would provide better redundancy, scalability, and throughput while reducing complexity compared to the mesh design. Questions are welcomed about the new design.
This document discusses SPDY, a binary protocol developed by Google for transporting HTTP traffic over TLS. SPDY provides features like multiplexing, header compression, and server push that can make page loads up to 146% faster compared to traditional HTTP. The document outlines the history and need for SPDY, how it works, performance results from implementations in Nginx and Chrome, and how to detect and enable SPDY in browsers. It encourages adoption of SPDY to improve page load speeds for users on modern broadband connections accessing heavier web pages.
Urs Hoelzle
Vice President
Google
Summary
¢ Google operates two large backbone networks
$ Internet-facing backbone (user traffic)
$ Datacenter backbone (internal traffic)
¢ Managing large backbones is hard
¢ OpenFlow has helped us improve backbone performance and reduce backbone complexity and cost
¢ I'll tell you how
ONS2015: http://bit.ly/ons2015sd
ONS Inspire! Webinars: http://bit.ly/oiw-sd
Watch the talk (video) on ONS Content Archives: http://bit.ly/ons-archives-sd
Uber mobility - High Performance NetworkingDhaval Patel
?
Speakers: Ganesh Srinivasan & Minh Pham (Uber), Jim Roskind (Neumob), Makarand Dharmapurikar & Eric Anderson (Google), and Karthik Ramgopal (LinkedIn)
Networking is one of the most important, yet often underserved aspects of any mobile application. The latency and bandwidth of mobile networks can vary greatly between cities and even within cities, ranging from broadband LTE speeds to performance that feels more like a 300 baud modem.
You can read more about Uber Mobility here : https://www.uber.com/p/uber-mobility/
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentViach Kakovskyi
?
This document discusses building instant messaging platforms with Python. It covers common messaging protocols like XMPP and WebSocket, how they establish and send messages. It also discusses the life of a messaging platform, including authentication, delivery, parsing, and more. Lessons learned include handling bursty traffic, reconnect storms, and preventing incidents. Python is well-suited for messaging backends but other languages may be better for some tasks.
The document discusses Cloudflare's globally distributed network and how the concept of "the edge" is evolving. Some key points:
- Cloudflare operates over 155 network points of presence in more than 72 countries, handling over 600 billion web requests and 100 billion DNS requests daily.
- The edge used to refer to client-server relationships but now refers to distributed, peer-to-peer, and serverless architectures enabled by technologies like edge computing and 5G.
- This shifting edge has implications for network design and security, requiring approaches like mesh networks, automation, and lightweight compute at the network boundaries.
- Cloudflare aims to deploy its edge infrastructure within 10 milliseconds of all internet users.
MySQL X protocol - Talking to MySQL Directly over the WireSimon J Mudd
?
The document discusses the MySQL X Protocol, which introduces a new way for clients to communicate directly with MySQL servers over TCP/IP. It provides an overview of how the protocol works, including capabilities exchange, authentication, querying the server for both SQL and noSQL data, pipelining requests, and the need for a formal protocol specification. Building client drivers requires understanding the protocol by reading documentation, source code, and examples as documentation is still incomplete. Pipelining requests can improve performance over high-latency connections. A standard specification would help driver development and ensure compatibility as the protocol evolves.
This document contains the slides for a webinar presented by Achmad Mardiansyah from GLC Networks on Mikrotik fasttrack. The webinar discusses how fasttrack can improve router performance by skipping processing posts for certain connections. Fasttrack works by applying connection tracking and NAT acceleration to specific connections marked using the firewall's fasttrack-connection action. The webinar demonstrates how to configure fasttrack rules and check fasttrack status, with cautions that fasttracked packets bypass processing like queues. Attendees are invited to register for GLC Network's Mikrotik training courses.
A technical overview of the WebRTC Data Channel and common problems in its use. These slides accompanied a similar talk that was given in Paris as part of the WebRTC Conference Paris 2014. You can find the complete text of the presentation here: http://viblast.com/blog/2014/12/30/overview-webrtc-data-channel/.
Internet Noise (A Story About Two Little Subnets - Tom PasekaMyNOG
?
Tom Paseka from Cloudflare presented on internet noise received on the IP blocks 1.1.1.0/24 and 1.0.0.0/24. He discussed that these blocks receive unwanted traffic such as from misconfigurations and misuse. Traffic levels have increased to 8-13Gbps from previous studies. Legitimate traffic makes up an estimated 7-13% and includes DNS queries. Availability testing found issues with over 30 ISPs null routing or using the blocks internally. Documentation recommends blocks like 192.0.2.0/24 for examples but sometimes they are still misused.
Webinar topic: ISP Load Balancing with Mikrotik ECMP
Presenter: Achmad Mardiansyah
In this webinar series, We are discussing ISP Load Balancing with Mikrotik ECMP
Please share your feedback or webinar ideas here: http://bit.ly/glcfeedback
Check our schedule for future events: https://www.glcnetworks.com/schedule/
Follow our social media for updates: Facebook, Instagram, YouTube Channel, and telegram
Recording is available on Youtube
https://youtu.be/pUy6-EOy2mM
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthNicolas Brousse
?
TubeMogul grew from few servers to over two thousands servers and handling over one trillion http requests a month, processed in less than 50ms each. To keep up with the fast growth, the SRE team had to implement an efficient Continuous Delivery infrastructure that allowed to do over 10,000 puppet deployment and 8,500 application deployment in 2014. In this presentation, we will cover the nuts and bolts of the TubeMogul operations engineering team and how they overcome challenges.
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp
?
Доклад построен на опыте разработки платформы реал-тайм мессенджера с характеристиками:
* 100 000+ одновременно подключенных пользователей
* 100+ серверов
* REST API для ботов
Структура доклада:
* Зачем разрабатывать мессенджер?
* Актуальные протоколы обмена сообщениями
* Архитектурные подходы к разработке мессенджера
* Библиотеки и инструменты
* Проблемы и подводные камни
9. Incremental Improvements - Meh.
¢ Incremental changes don't "move the needle"
$ They're hard to figure out individually
$ Each only works for some people, with hacks
¢ Problem is the intermediaries (a.k.a. proxies)
$ Transparent proxies change the content.
$ Example: pipelining - donde esta?
$ Example: stripped "Accept-Encoding" headers
* we can't even improve "negotiated" compression!
10. SPDY Requirements
¢ Avoid requiring the website author to change content
Allow for incremental changes
Performing "better" with content changes is okay
Performing "worse" without content changes is unacceptable
¢ Perform always better, never worse than HTTP
¢ Drop-in replacement from webapp's point of view
$ Changing the web server/application server is inevitable
and therefore acceptable
11. What is SPDY?
¢ Multiplexing
$ Get the data off the client
¢ Compression
$ HTTP headers are excessive
$ Uplink bandwidth is limited
¢ Prioritization
$ Today the browser holds back
$ Priorities enable multiplexing
¢ Server Push
$ Websites do some of this today with data URLs
13. Deployment: Process of Elimination
¢ Avoid changing the lower-level transport
¢ Available transports: TCP or UDP.
$ Note: SCTP not an option due to NAT.
¢ UDP
$ We'd have to re-engineer TCP features.
¢ That leaves us with TCP.
$ Ok, so which port? 80 or 443?
14. Deployment: Port 80
¢ HTTP runs on port 80.
¢ Proxies are a barrier to protocols
$ HTTP/1.1 1999 - Pipelining still not deployed
$ Compression negotiation
¢ Upgrade header requires a round trip
¢ WebSockets Data Shows that using HTTP over a non-
standard port is less tampered with than port 80.
$ Success rate:
* HTTP (port 80) 67%
* HTTP (port 61985) 86%
15. Deployment: Port 443
¢ Port 443 runs SSL/TLS.
$ Adds server authentication & encryption
¢ Handshake is extensible:
$ Next-Protocol-Negotiation
www.ietf.org/id/draft-agl-tls-nextprotoneg-00.txt
16. Can We Address Latency & Security
Separately?
¢ If eavesdropping in the cafe is still possible in 2015 with
trivial tools, we have failed our users.
¢ The internet is weak already and getting worse.
$ A matter of life and death
¢ Firesheep tools make sniffing easy
¢ Major content providers want privacy
$ Facebook opt-in
$ Twitter opt-in UPDATE: Now on by default!
$ GMail and G+ already SSL only.
$ SSL is just too slow right now...
17. HTTPS vs SPDY (Google)
Update Jan 2012: Google has announced that SPDY (w/
SSL) is now faster than HTTP on Google properties.
18. Who Uses SPDY?
¢ Websites:
$ Google since 2010
$ Amazon Kindle Fire
¢ Browsers
$ Google Chrome since 2010
$ Firefox 11+
$ Chrome for Android
¢ Servers
$ Apache w/ mod-spdy
$ nginx has announced support coming
$ Java/Ruby/Python/node.js/Erlang/Go & C impls!
$ netty framework
¢ Mobile
$ iPhone client
19. SPDY & Mobile
¢ New client-side problems
$ Battery life constraints
$ Severely limited CPUs
¢ New Network Properties
$ Latency from 150 - 300ms per Round Trip
$ Bandwidth 1-4Mbps
¢ New use cases
$ Mobile Web Browsers are 1st generation
* So web browsing sucks
$ Everyone uses Apps w/ REST APIs anyway
20. SPDY and Battery Life
¢ Network activity is one of the biggest battery drains
¢ SPDY is lightweight:
$ Fewer connections
$ Fewer packets
$ Fewer sends
¢ But.....
$ Mobile network activity can be sporadic
* e.g. a ping every 60-300secs
$ SSL connections are more expensive to establish
* Anecdotal - is the handshake CPU intensive
$ Every SSL implementation is unoptimized.
¢ I hate to say it, but until we optimize SSL clients on
mobile. SPDY may not be ready for mobile.
21. SPDY and Mobile Networks
¢ Good news
$ Mobile networks are the SPDY sweetspot
* High latency and High bandwidth
¢ Bad news
$ Operators timeout NATs aggressively (~60s)
$ Traditional SSL is unoptimized
* OCSP validation is particularly poor
¢ Mitigation
$ Trust your own certificate to bypass OCSP in apps
$ Don't trust pooled connections over 60s old
22. SPDY & REST APIs
¢ Apps use HTTP to transfer JSON or XML
¢ Don't need to load HTML/CSS/Assets, they are installed up
front
¢ REST APIs over HTTP need batching
$ due to HTTP connection/serialization limits
$ JSON fundamentally not streamable
$ Lose cacheability
$ Sacrifices latency for throughput
23. JSON Streamability
¢ REST APIs are messages; how to best deliver a message
over any network?
¢ Network will chunk data.
¢ Round trips exist *between* chunks. More chunks == more
chance of delays, lost packets.
¢ Small JSON blobs are good.
¢ Large JSON blobs are bad.
¢ JSON not parseable until all JSON is received!!
24. Standardization
¢ Test implementations are cropping up everywhere
¢ Badly in need of an interoperability test suite!
¢ Going to IETF next month to talk about HTTP/2.0
$ SPDY will likely change, but hopefully will be a part of it.
¢ In 2012, SPDY is available on over 50% of browsers