The document compares REST and gRPC approaches to building APIs. It notes that while REST uses JSON over HTTP, gRPC uses protocol buffers over HTTP/2, allowing for benefits like binary encoding, multiplexing, and simpler parsing. An example shows a character request is 205 characters in JSON but only 44 bytes in protocol buffers. gRPC is also said to allow lower latency, better CPU utilization, and server push capabilities compared to REST for real-time use cases.
This document provides instructions for setting up a clustered Samba file server using GlusterFS and CTDB. It begins with an overview of CTDB and why it is needed when using GlusterFS with CIFS/NFS clients instead of native clients. It then describes the steps to configure GlusterFS volumes, install CTDB, configure the network topology with separate interconnects for GlusterFS and CTDB, and integrate Samba with CTDB. The goal is to provide features like floating IP addresses and shared file locks across multiple Samba servers using the distributed storage provided by GlusterFS.
Prometheus and Docker (Docker Galway, November 2015)Brian Brazil
Brian Brazil is an engineer passionate about reliable systems who has worked at Google SRE and Boxever. He discusses Prometheus, an open source monitoring system he helped create. Prometheus offers inclusive monitoring of services, is manageable and reliable, integrates easily with other tools, and provides powerful querying and dashboards. It is efficient, scalable, and helps provide visibility into systems through its data model and labeling.
Introduction to memcached, a caching service designed for optimizing performance and scaling in the web stack, seen from perspective of MySQL/PHP users. Given for 2nd year students of professional bachelor in ICT at Kaho St. Lieven, Gent.
Architecting for the Cloud using NetflixOSS - Codemash WorkshopSudhir Tonse
This document provides an overview and agenda for a presentation on architecting for the cloud using the Netflix approach. Some key points:
- Netflix has over 40 million members streaming over 1 billion hours per month of content across over 40 countries.
- Netflix runs on AWS and handles billions of requests per day across thousands of instances globally.
- The presentation will discuss how to build your own platform as a service (PaaS) based on Netflix's open source libraries, including platform services, libraries, and tools.
- The Netflix approach focuses on microservices, automation, and resilience to support rapid iteration on cloud infrastructure.
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsDataWorks Summit
This document discusses supporting Apache HBase and improving troubleshooting and supportability. It introduces two Cloudera employees who work on HBase support and provides an overview of typical troubleshooting scenarios for HBase like performance degradation, process crashes, and inconsistencies. The agenda covers using existing tools like logs and metrics to troubleshoot HBase performance issues with a general approach, and introduces htop as a real-time monitoring tool for HBase.
gRPC is an open source RPC framework that makes it easy to build a distributed system across multiple languages. It uses HTTP/2 for transport, has features like streaming, load balancing and authentication built-in. It is used widely at Google and is now available open source with implementations in 10 languages. gRPC benefits from being layered on HTTP/2 for interoperability and has a pluggable architecture for advanced features like monitoring and proxies.
From cache to in-memory data grid. Introduction to Hazelcast.Taras Matyashovsky
This presentation:
* covers basics of caching and popular cache types
* explains evolution from simple cache to distributed, and from distributed to IMDG
* not describes usage of NoSQL solutions for caching
* is not intended for products comparison or for promotion of Hazelcast as the best solution
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...HostedbyConfluent
Imagine a world where you can access metrics, events, traces, and logs in seconds without changing code. Even more, a world where you can run scripts to debug metrics as code. In this session, you will learn about eBPF, a powerful technology with origins in the Linux kernel that holds the potential to fundamentally change how Networking, Observability, and Security are delivered.
We’ll see eBPF in action applied to the Kafka world: identify Kafka consumers, producers, and brokers, see how they interact with each other and how many resources they consume. We'll even learn how to measure consumer lag without external components. If you want to know what’s next in Kafka observability, this session is for you.
Spend some time working with OpenAPI and gRPC and you’ll notice that these two technologies have a lot in common. Both are open source efforts, both describe APIs, and both promise better experiences for API producers and consumers. So why do we need both? If we do, what value does each provide? What can each project learn from the other? We’ll bring the two together for a side-by-side comparison and pose answers to these and other questions about two API methodologies that will do much to influence the future of networked APIs.
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...AboutYouGmbH
The document discusses gRPC, an open source framework for building microservices. It was created by Google to be a high performance, open source universal RPC framework. gRPC uses HTTP/2 for transport, Protocol Buffers as the interface definition language, and generated client/server code for many languages to make cross-platform communications simple and efficient. The document provides an overview of gRPC's goals and architecture, how to define a service using .proto files, and examples of common RPC patterns like unary, streaming, and bidirectional calls.
Join Red Hat and Vodafone for an exciting presentation on the benefits of Quarkus over competing technologies. Hear from Vodafone's experts about their successful transition to Quarkus from Spring and discover how Quarkus can help your organization cut cloud costs, improve cluster stability, and achieve better performance.
A live demo will showcase the power of Quarkus through examples of HTTP requests, security approaches, exception handling, logging, and more.
In summary, this informative session will provide you valuable insights into the benefits of using Quarkus while also getting real world performance and development time numbers from Vodafone, information which can and should influence your next decisions on what Server Side Java technology to choose!
In the session, we discussed the End-to-end working of Apache Airflow that mainly focused on "Why What and How" factors. It includes the DAG creation/implementation, Architecture, pros & cons. It also includes how the DAG is created for scheduling the Job and what all steps are required to create the DAG using python script & finally with the working demo.
This talk discusses Linux profiling using perf_events (also called "perf") based on Netflix's use of it. It covers how to use perf to get CPU profiling working and overcome common issues. The speaker will give a tour of perf_events features and show how Netflix uses it to analyze performance across their massive Amazon EC2 Linux cloud. They rely on tools like perf for customer satisfaction, cost optimization, and developing open source tools like NetflixOSS. Key aspects covered include why profiling is needed, a crash course on perf, CPU profiling workflows, and common "gotchas" to address like missing stacks, symbols, or profiling certain languages and events.
The document discusses various techniques for profiling CPU and memory performance in Rust programs, including:
- Using the flamegraph tool to profile CPU usage by sampling a running process and generating flame graphs.
- Integrating pprof profiling into Rust programs to expose profiles over HTTP similar to how it works in Go.
- Profiling heap usage by integrating jemalloc profiling and generating heap profiles on program exit.
- Some challenges with profiling asynchronous Rust programs due to the lack of backtraces.
The key takeaways are that there are crates like pprof-rs and techniques like jemalloc integration that allow collecting CPU and memory profiles from Rust programs, but profiling asynchronous programs
Systems Monitoring with Prometheus (Devops Ireland April 2015)Brian Brazil
Monitoring means many things to many people. This talk looks at Systems Monitoring, that is how to keep an eye on a given system and use this as part of overall management of a system. This talk will cover Why one monitors, What to monitor, How to monitor, the general design of a monitoring system and how Prometheus is a good fit for this in terms of instrumentation, consoles, alerts, general system health and sanity.
Prometheus is a next-generation monitoring system publicly announced earlier this year, developed by companies including SoundCloud, locals Boxever and Docker. Since launch there has been wide-spread interest, and many community contributions.
For more information see http://prometheus.io or http://www.boxever.com/tag/monitoring
Under the Hood of a Shard-per-Core Database ArchitectureScyllaDB
Most databases are based on architectures that pre-date advances to modern hardware. This results in performance issues, the need to overprovision, and a high total cost of ownership. In this webinar we will discuss the advances to modern server technology and take a deep dive into Scylla’s shard-per-core architecture and our asynchronous engine, the Seastar framework.
Join us to learn how Seastar (and Scylla):
Avoid locks and contention on the CPU level
Bypass kernel bottlenecks
Implement its per-core shared-nothing autosharding mechanism
Utilize modern storage hardware
Leverage NUMA to get the best RAM performance
Balance your data across CPUs and nodes for best and smoothest performance
Plus we’ll cover the advantages of unlocking vertical scalability.
Speaker: Damien Gasparina, Engineer, Confluent
Here's how to fail at Apache Kafka brilliantly!
https://www.meetup.com/Paris-Data-Engineers/events/260694777/
Reactive app using actor model & apache sparkRahul Kumar
Developing Application with Big Data is really challenging work, scaling, fault tolerance and responsiveness some are the biggest challenge. Realtime bigdata application that have self healing feature is a dream these days. Apache Spark is a fast in-memory data processing system that gives a good backend for realtime application.In this talk I will show how to use reactive platform, Actor model and Apache Spark stack to develop a system that have responsiveness, resiliency, fault tolerance and message driven feature.
Sa introduction to big data pipelining with cassandra & spark west mins...Simon Ambridge
This document provides an overview and outline of a 1-hour introduction to building a big data pipeline using Docker, Cassandra, Spark, Spark-Notebook and Akka. The introduction is presented as a half-day workshop at Devoxx November 2015. It uses a data pipeline environment from Data Fellas and demonstrates how to use scalable distributed technologies like Docker, Spark, Spark-Notebook and Cassandra to build a reactive, repeatable big data pipeline. The key takeaway is understanding how to construct such a pipeline.
Since 2014, Typesafe has been actively contributing to the Apache Spark project, and has become a certified development support partner of Databricks, the company started by the creators of Spark. Typesafe and Mesosphere have forged a partnership in which Typesafe is the official commercial support provider of Spark on Apache Mesos, along with Mesosphere’s Datacenter Operating Systems (DCOS).
In this webinar with Iulian Dragos, Spark team lead at Typesafe Inc., we reveal how Typesafe supports running Spark in various deployment modes, along with the improvements we made to Spark to help integrate backpressure signals into the underlying technologies, making it a better fit for Reactive Streams. He also show you the functionalities at work, and how to make it simple to deploy to Spark on Mesos with Typesafe.
We will introduce:
Various deployment modes for Spark: Standalone, Spark on Mesos, and Spark with Mesosphere DCOS
Overview of Mesos and how it relates to Mesosphere DCOS
Deeper look at how Spark runs on Mesos
How to manage coarse-grained and fine-grained scheduling modes on Mesos
What to know about a client vs. cluster deployment
A demo running Spark on Mesos
Streaming Analytics with Spark, Kafka, Cassandra and AkkaHelena Edelson
This document discusses a new approach to building scalable data processing systems using streaming analytics with Spark, Kafka, Cassandra, and Akka. It proposes moving away from architectures like Lambda and ETL that require duplicating data and logic. The new approach leverages Spark Streaming for a unified batch and stream processing runtime, Apache Kafka for scalable messaging, Apache Cassandra for distributed storage, and Akka for building fault tolerant distributed applications. This allows building real-time streaming applications that can join streaming and historical data with simplified architectures that remove the need for duplicating data extraction and loading.
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Helena Edelson
This document provides an overview of streaming big data with Spark, Kafka, Cassandra, Akka, and Scala. It discusses delivering meaning in near-real time at high velocity and an overview of Spark Streaming, Kafka and Akka. It also covers Cassandra and the Spark Cassandra Connector as well as integration in big data applications. The presentation is given by Helena Edelson, a Spark Cassandra Connector committer and Akka contributor who is a Scala and big data conference speaker working as a senior software engineer at DataStax.
This talk will address new architectures emerging for large scale streaming analytics. Some based on Spark, Mesos, Akka, Cassandra and Kafka (SMACK) and other newer streaming analytics platforms and frameworks using Apache Flink or GearPump. Popular architecture like Lambda separate layers of computation and delivery and require many technologies which have overlapping functionality. Some of this results in duplicated code, untyped processes, or high operational overhead, let alone the cost (e.g. ETL).
I will discuss the problem domain and what is needed in terms of strategies, architecture and application design and code to begin leveraging simpler data flows. We will cover how the particular set of technologies addresses common requirements and how collaboratively they work together to enrich and reinforce each other.
Real-Time Anomaly Detection with Spark MLlib, Akka and CassandraNatalino Busa
We present a solution for streaming anomaly detection, named “Coral”, based on Spark, Akka and Cassandra. In the system presented, we run Spark to run the data analytics pipeline for anomaly detection. By running Spark on the latest events and data, we make sure that the model is always up-to-date and that the amount of false positives is kept low, even under changing trends and conditions. Our machine learning pipeline uses Spark decision tree ensembles and k-means clustering. Once the model is trained by Spark, the model’s parameters are pushed to the Streaming Event Processing Layer, implemented in Akka. The Akka layer will then score 1000s of event per seconds according to the last model provided by Spark. Spark and Akka communicate which each other using Cassandra as a low-latency data store. By doing so, we make sure that every element of this solution is resilient and distributed. Spark performs micro-batches to keep the model up-to-date while Akka detects the new anomalies by using the latest Spark-generated data model. The project is currently hosted on Github. Have a look at : http://coral-streaming.github.io
Alpine academy apache spark series #1 introduction to cluster computing wit...Holden Karau
Alpine academy apache spark series #1 introduction to cluster computing with python & a wee bit of scala. This is the first in the series and is aimed at the intro level, the next one will cover MLLib & ML.
NOTE: This was converted to Powerpoint from Keynote. Slideshare does not play the embedded videos. You can download the powerpoint from slideshare and import it into keynote. The videos should work in the keynote.
Abstract:
In this presentation, we will describe the "Spark Kernel" which enables applications, such as end-user facing and interactive applications, to interface with Spark clusters. It provides a gateway to define and run Spark tasks and to collect results from a cluster without the friction associated with shipping jars and reading results from peripheral systems. Using the Spark Kernel as a proxy, applications can be hosted remotely from Spark.
This presentation includes a comprehensive introduction to Apache Spark. From an explanation of its rapid ascent to performance and developer advantages over MapReduce. We also explore its built-in functionality for application types involving streaming, machine learning, and Extract, Transform and Load (ETL).
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaHelena Edelson
Scala Days, Amsterdam, 2015: Lambda Architecture - Batch and Streaming with Spark, Cassandra, Kafka, Akka and Scala; Fault Tolerance, Data Pipelines, Data Flows, Data Locality, Akka Actors, Spark, Spark Cassandra Connector, Big Data, Asynchronous data flows. Time series data, KillrWeather, Scalable Infrastructure, Partition For Scale, Replicate For Resiliency, Parallelism
Isolation, Data Locality, Location Transparency
Reactive dashboard’s using apache sparkRahul Kumar
Apache Spark's Tutorial talk, In this talk i explained how to start working with Apache spark, feature of apache spark and how to compose data platform with spark. This talk also explains about reactive platform, tools and framework like Play, akka.
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time PersonalizationPatrick Di Loreto
The gambling industry has arguably been one of the most comprehensively affected by the internet revolution, and if an organization such as William Hill hadn't adapted successfully it would have disappeared. We call this, “Going Reactive.”
The company's latest innovations are very cutting edge platforms for personalization, recommendation, and big data, which are based on Akka, Scala, Play Framework, Kafka, Cassandra, Spark, and Mesos.
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo LeeSpark Summit
This document discusses Apache Zeppelin, an open-source notebook for interactive data analytics. It provides an overview of Zeppelin's features, including interactive notebooks, multiple backends, interpreters, and a display system. The document also covers Zeppelin's adoption timeline, from its origins as a commercial product in 2012 to becoming an Apache Incubator project in 2014. Future projects involving Zeppelin like Helium and Z-Manager are also briefly described.
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...Helena Edelson
Regardless of the meaning we are searching for over our vast amounts of data, whether we are in science, finance, technology, energy, health care…, we all share the same problems that must be solved: How do we achieve that? What technologies best support the requirements? This talk is about how to leverage fast access to historical data with real time streaming data for predictive modeling for lambda architecture with Spark Streaming, Kafka, Cassandra, Akka and Scala. Efficient Stream Computation, Composable Data Pipelines, Data Locality, Cassandra data model and low latency, Kafka producers and HTTP endpoints as akka actors...
Spark Streaming makes it easy to build scalable fault-tolerant streaming applications. In this webinar, developers will learn:
*How Spark Streaming works - a quick review.
*Features in Spark Streaming that help prevent potential data loss.
*Complementary tools in a streaming pipeline - Kafka and Akka.
*Design and tuning tips for Reactive Spark Streaming applications.
Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...Anton Kirillov
This talk is about architecture designs for data processing platforms based on SMACK stack which stands for Spark, Mesos, Akka, Cassandra and Kafka. The main topics of the talk are:
- SMACK stack overview
- storage layer layout
- fixing NoSQL limitations (joins and group by)
- cluster resource management and dynamic allocation
- reliable scheduling and execution at scale
- different options for getting the data into your system
- preparing for failures with proper backup and patching strategies
Everyone in the Scala world is using or looking into using Akka for low-latency, scalable, distributed or concurrent systems. I'd like to share my story of developing and productionizing multiple Akka apps, including low-latency ingestion and real-time processing systems, and Spark-based applications.
When does one use actors vs futures?
Can we use Akka with, or in place of, Storm?
How did we set up instrumentation and monitoring in production?
How does one use VisualVM to debug Akka apps in production?
What happens if the mailbox gets full?
What is our Akka stack like?
I will share best practices for building Akka and Scala apps, pitfalls and things we'd like to avoid, and a vision of where we would like to go for ideal Akka monitoring, instrumentation, and debugging facilities. Plus backpressure and at-least-once processing.
Video: https://youtu.be/C_u4_l84ED8
Karl Isenberg reviews the history of distributed computing, clarifies terminology for layers in the container stack, and does a head to head comparison of several tools in the space, including Kubernetes, Marathon, and Docker Swarm. Learn which features and qualities are critical for container orchestration and how you can apply this knowledge when evaluating platforms.
Linux 4.x Tracing Tools: Using BPF SuperpowersBrendan Gregg
Talk for USENIX LISA 2016 by Brendan Gregg.
"Linux 4.x Tracing Tools: Using BPF Superpowers
The Linux 4.x series heralds a new era of Linux performance analysis, with the long-awaited integration of a programmable tracer: Enhanced BPF (eBPF). Formally the Berkeley Packet Filter, BPF has been enhanced in Linux to provide system tracing capabilities, and integrates with dynamic tracing (kprobes and uprobes) and static tracing (tracepoints and USDT). This has allowed dozens of new observability tools to be developed so far: for example, measuring latency distributions for file system I/O and run queue latency, printing details of storage device I/O and TCP retransmits, investigating blocked stack traces and memory leaks, and a whole lot more. These lead to performance wins large and small, especially when instrumenting areas that previously had zero visibility. Tracing superpowers have finally arrived.
In this talk I'll show you how to use BPF in the Linux 4.x series, and I'll summarize the different tools and front ends available, with a focus on iovisor bcc. bcc is an open source project to provide a Python front end for BPF, and comes with dozens of new observability tools (many of which I developed). These tools include new BPF versions of old classics, and many new tools, including: execsnoop, opensnoop, funccount, trace, biosnoop, bitesize, ext4slower, ext4dist, tcpconnect, tcpretrans, runqlat, offcputime, offwaketime, and many more. I'll also summarize use cases and some long-standing issues that can now be solved, and how we are using these capabilities at Netflix."
State of Containers and the Convergence of HPC and BigDatainside-BigData.com
In this deck from 2018 Swiss HPC Conference, Christian Kniep from Docker Inc. presents: State of Containers and the Convergence of HPC and BigData.
"This talk will recap the history of and what constitutes Linux Containers, before laying out how the technology is employed by various engines and what problems these engines have to solve. Afterward Christian will elaborate on why the advent of standards for images and runtimes moved the discussion from building and distributing containers to orchestrating containerized applications at scale. In conclusion attendees will get an update on how containers foster the convergence of Big Data and HPC workloads and the state of native HPC containers."
Learn more: http://docker.com
and
http://www.hpcadvisorycouncil.com/events/2018/swiss-workshop/agenda.php
Sign up for our insideHPC Newsletter: http://insidehpc.com/newsletter
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE
Kurento is an open source software that simplifies the creation of real-time communication applications involving audio and video streams. It provides a server that abstracts compatibility issues between senders and receivers and allows for manipulation or redistribution of streams. The server includes endpoints for stream input/output and filters for processing or transforming media as it flows through the pipeline. Example applications demonstrated by Kurento include an RTP receiver that redirects streams to a browser and a magic mirror that applies computer vision to detect and overlay images on a face in real-time video.
Distributed application usecase on dockerHiroshi Miura
1) The document discusses using Docker containers and the Hinemos monitoring system to automate operations for a distributed application running on container clusters.
2) Key benefits outlined include automated rebalancing of containers for performance and cost reduction, reduced downtime through automated fallback from failures, and consolidation of platforms through wrapping differences in container images.
3) Challenges addressed include complex data distribution management and inability to integrate environments for applications with different dependencies, which Docker containers help solve.
Ceph Day Shanghai - Hyper Converged PLCloud with Ceph Ceph Community
Hyper Converged PLCloud with CEPH
This document discusses PowerLeader Cloud (PLCloud), a cloud computing platform that uses a hyper-converged infrastructure with OpenStack, Docker, and Ceph. It provides an overview of PLCloud and how it has adopted OpenStack, Ceph, and other open source technologies. It then describes PLCloud's hyper-converged architecture and how it leverages OpenStack, Docker, and Ceph. Finally, it discusses a specific use case where Ceph RADOS Gateway is used for media storage and access in PLCloud.
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE
Kurento Media Server is an open source platform for processing audio and video streams. It allows input streams to be processed and output streams to be manipulated or redistributed. The server has endpoints to receive media and filters that can transform or process the media. Client applications connect to Kurento to build processing pipelines with these components and control the streaming applications.
The document discusses the need for web servers to provide various web services for a company. It provides an overview of the history and development of the World Wide Web and web servers. It then describes key features and functions of the Apache web server, including caching, logging, mapping URLs to files, access control, server-side includes, and virtual hosting.
Here I covered the cores of Apache and also discuss each and every core. Virtual host, resistance server process some protocols like HTTP, SMTP, DNS FTP, are also be highlighted.
Focus on some installing part of apache.
The document discusses OpenStack and Fibre Channel storage. It provides an overview of OpenStack, including its goals of being an open platform with broad support and empowering users. It describes core OpenStack technologies like Compute, Object Storage, and Block Storage. It outlines the history and current state of Fibre Channel support in OpenStack, including the Fibre Channel Zone Manager that automates zoning. It diagrams the high-level architecture and components involved in provisioning Fibre Channel volumes to virtual machines from OpenStack.
OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...OpenNebula Project
In this session we'll explore measuring VM performance and evaluating changes to settings or infrastructure which can affect performance positively. We'll also share the best current practice for architecture for high performance clouds from our experience.
EDW CENIPA is a opensource project designed to enable analysis of aeronautical incidentes that occured in the brazilian civil aviation. The project uses techniques and BI tools that explore innovative low-cost technologies. Historically, Business Intelligence platforms are expensive and impracticable for small projects. BI projects require specialized skills and high development costs. This work aims to break this barrier.
Presentation from DockerCon EU '17 about how Aurea achieved over 50% cost reduction using Docker and about two major technical obstacles we had when dockerizing legacy applications.
This document provides an overview of application deployment on cloud platforms. It begins with an introduction to cloud computing and comparisons of SAAS, PAAS and IAAS models. The document then discusses benefits and challenges of cloud deployment. It also covers business and architectural considerations for moving applications to the cloud. Finally, it demonstrates several popular platform as a service providers like Firebase, AWS, Heroku and Cloud Foundry and provides guidance on deploying applications on each.
Ch 22: Web Hosting and Internet Serverswebhostingguy
Web hosting involves providing space on a server for websites. Linux is commonly used for hosting due to its maintainability and performance. A web server software like Apache is installed to handle HTTP requests from browsers. URLs identify resources on the web using protocols like HTTP and FTP. CGI scripts allow dynamic content generation but pose security risks. Load balancing distributes server load across multiple systems. Choosing a server depends on factors like robustness, performance, updates, and cost. Apache is widely used and configurable using configuration files that control server parameters, resources, and access restrictions. Virtual interfaces allow a single server to host multiple websites. Caching and proxies can improve performance and security. Anonymous FTP allows public file downloads.
Simplifying and accelerating converged media with Open Visual CloudLiz Warner
Challenges exist with media transformation into Visual Cloud services and the flexibility to migrate those services to new HW platforms. Learn how Intel and partners are solving these challenges with highly optimized cloud native media processing, media analytics, and graphics/rendering components to quickly and easily deliver end-to-end visual cloud services with scalable open source software. Two visual cloud services around media delivery and media analytics will be demonstrated to showcase how to enable faster time to market for innovative “new media” services.
Netflix Open Source Meetup Season 4 Episode 2aspyker
In this episode, we will take a close look at 2 different approaches to high-throughput/low-latency data stores, developed by Netflix.
The first, EVCache, is a battle-tested distributed memcached-backed data store, optimized for the cloud. You will also hear about the road ahead for EVCache it evolves into an L1/L2 cache over RAM and SSDs.
The second, Dynomite, is a framework to make any non-distributed data-store, distributed. Netflix's first implementation of Dynomite is based on Redis.
Come learn about the products' features and hear from Thomson and Reuters, Diego Pacheco from Ilegra and other third party speakers, internal and external to Netflix, on how these products fit in their stack and roadmap.
The document discusses the performance of HTTP/2 compared to HTTP/1.1 across different network conditions. It summarizes results from testing 8 real websites under 16 bandwidth and latency combinations with varying packet loss rates. Overall, HTTP/2 performs better for document complete time and speed index, especially on slower connections, though results vary depending on the specific site and metrics measured.
This document discusses programming TCP for responsiveness when sending HTTP/2 responses. It describes how to reduce head-of-line blocking by filling the TCP congestion window before sending data. The key points are reading TCP states via getsockopt to determine how much data can be sent immediately, and optimizing this only for high latency connections or small congestion windows to avoid additional response delays. Benchmarks show this approach can reduce response times from multiple round-trip times to a single RTT.
The document discusses optimizations to TCP and HTTP/2 to improve responsiveness on the web. It describes how TCP slow start works and the delays introduced in standard HTTP/2 usage from TCP/TLS handshakes. The author proposes adjusting the TCP send buffer polling threshold to allow switching between responses more quickly based on TCP congestion window state. Benchmark results show this can reduce response times by eliminating an extra round-trip delay.
Cache aware-server-push in H2O version 1.5Kazuho Oku
This document discusses cache-aware server push in H2O version 1.5. It describes calculating a fingerprint of cached assets using a Golomb compressed set to identify what assets need to be pushed from the server. It also discusses implementing this fingerprint using a cookie or service worker. The hybrid approach stores responses in the service worker cache and updates the cookie fingerprint. H2O 1.5 implements cookie-based fingerprints to cancel push indications for cached assets, potentially improving page load speeds.
JSON SQL Injection and the Lessons LearnedKazuho Oku
This document discusses JSON SQL injection and lessons learned from vulnerabilities in SQL query builders. It describes how user-supplied JSON input containing operators instead of scalar values could manipulate queries by injecting conditions like id!='-1' instead of a specific id value. This allows accessing unintended data. The document examines how SQL::QueryMaker and a strict mode in SQL::Maker address this by restricting query parameters to special operator objects or raising errors on non-scalar values. While helpful, strict mode may break existing code, requiring changes to parameter handling. The vulnerability also applies to other languages' frameworks that similarly convert arrays to SQL IN clauses.
This document discusses using the prove command-line tool to run tests and other scripts. Prove is a test runner that uses the Test Anything Protocol (TAP) to aggregate results. It can run tests and scripts written in any language by specifying the interpreter with --exec. Extensions other than .t can be run by setting --ext. Prove searches for tests in the t/ directory by default but can run any kind of scripts or tasks placed in t/, such as service monitoring scripts. The .proverc file can save common prove options for a project.
JSX - developing a statically-typed programming language for the WebKazuho Oku
Kazuho Oku presents JSX, a statically-typed programming language that compiles to JavaScript. JSX aims to improve productivity over JavaScript by enabling errors to be caught at compile-time rather than runtime. It also aims to optimize code size and execution speed compared to JavaScript through type information and compiler optimizations. Oku discusses JSX language features like classes and types, benchmarks showing improved performance over JavaScript, and efforts to bind JSX to W3C standards through automatic translation of interface definition languages.
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Erasmo Purificato
Slide of the tutorial entitled "Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Emerging Trends" held at UMAP'24: 32nd ACM Conference on User Modeling, Adaptation and Personalization (July 1, 2024 | Cagliari, Italy)
Quality Patents: Patents That Stand the Test of TimeAurora Consulting
Is your patent a vanity piece of paper for your office wall? Or is it a reliable, defendable, assertable, property right? The difference is often quality.
Is your patent simply a transactional cost and a large pile of legal bills for your startup? Or is it a leverageable asset worthy of attracting precious investment dollars, worth its cost in multiples of valuation? The difference is often quality.
Is your patent application only good enough to get through the examination process? Or has it been crafted to stand the tests of time and varied audiences if you later need to assert that document against an infringer, find yourself litigating with it in an Article 3 Court at the hands of a judge and jury, God forbid, end up having to defend its validity at the PTAB, or even needing to use it to block pirated imports at the International Trade Commission? The difference is often quality.
Quality will be our focus for a good chunk of the remainder of this season. What goes into a quality patent, and where possible, how do you get it without breaking the bank?
** Episode Overview **
In this first episode of our quality series, Kristen Hansen and the panel discuss:
⦿ What do we mean when we say patent quality?
⦿ Why is patent quality important?
⦿ How to balance quality and budget
⦿ The importance of searching, continuations, and draftsperson domain expertise
⦿ Very practical tips, tricks, examples, and Kristen’s Musts for drafting quality applications
https://www.aurorapatents.com/patently-strategic-podcast.html
YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS
WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well.
Some facts about WPRiders and why we are one of the best firms around:
More than 700 five-star reviews! You can check them here.
1500 WordPress projects delivered.
We respond 80% faster than other firms! Data provided by Freshdesk.
We’ve been in business since 2015.
We are located in 7 countries and have 22 team members.
With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce.
Our team members are:
- highly experienced developers (employees & contractors with 5 -10+ years of experience),
- great designers with an eye for UX/UI with 10+ years of experience
- project managers with development background who speak both tech and non-tech
- QA specialists
- Conversion Rate Optimisation - CRO experts
They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals.
At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.
Implementations of Fused Deposition Modeling in real worldEmerging Tech
The presentation showcases the diverse real-world applications of Fused Deposition Modeling (FDM) across multiple industries:
1. **Manufacturing**: FDM is utilized in manufacturing for rapid prototyping, creating custom tools and fixtures, and producing functional end-use parts. Companies leverage its cost-effectiveness and flexibility to streamline production processes.
2. **Medical**: In the medical field, FDM is used to create patient-specific anatomical models, surgical guides, and prosthetics. Its ability to produce precise and biocompatible parts supports advancements in personalized healthcare solutions.
3. **Education**: FDM plays a crucial role in education by enabling students to learn about design and engineering through hands-on 3D printing projects. It promotes innovation and practical skill development in STEM disciplines.
4. **Science**: Researchers use FDM to prototype equipment for scientific experiments, build custom laboratory tools, and create models for visualization and testing purposes. It facilitates rapid iteration and customization in scientific endeavors.
5. **Automotive**: Automotive manufacturers employ FDM for prototyping vehicle components, tooling for assembly lines, and customized parts. It speeds up the design validation process and enhances efficiency in automotive engineering.
6. **Consumer Electronics**: FDM is utilized in consumer electronics for designing and prototyping product enclosures, casings, and internal components. It enables rapid iteration and customization to meet evolving consumer demands.
7. **Robotics**: Robotics engineers leverage FDM to prototype robot parts, create lightweight and durable components, and customize robot designs for specific applications. It supports innovation and optimization in robotic systems.
8. **Aerospace**: In aerospace, FDM is used to manufacture lightweight parts, complex geometries, and prototypes of aircraft components. It contributes to cost reduction, faster production cycles, and weight savings in aerospace engineering.
9. **Architecture**: Architects utilize FDM for creating detailed architectural models, prototypes of building components, and intricate designs. It aids in visualizing concepts, testing structural integrity, and communicating design ideas effectively.
Each industry example demonstrates how FDM enhances innovation, accelerates product development, and addresses specific challenges through advanced manufacturing capabilities.
Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.
Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 :
- Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants.
- REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.
Best Programming Language for Civil EngineersAwais Yaseen
The integration of programming into civil engineering is transforming the industry. We can design complex infrastructure projects and analyse large datasets. Imagine revolutionizing the way we build our cities and infrastructure, all by the power of coding. Programming skills are no longer just a bonus—they’re a game changer in this era.
Technology is revolutionizing civil engineering by integrating advanced tools and techniques. Programming allows for the automation of repetitive tasks, enhancing the accuracy of designs, simulations, and analyses. With the advent of artificial intelligence and machine learning, engineers can now predict structural behaviors under various conditions, optimize material usage, and improve project planning.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
Details of description part II: Describing images in practice - Tech Forum 2024BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
How Social Media Hackers Help You to See Your Wife's Message.pdfHackersList
In the modern digital era, social media platforms have become integral to our daily lives. These platforms, including Facebook, Instagram, WhatsApp, and Snapchat, offer countless ways to connect, share, and communicate.
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Bert Blevins
Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
The Rise of Supernetwork Data Intensive ComputingLarry Smarr
Invited Remote Lecture to SC21
The International Conference for High Performance Computing, Networking, Storage, and Analysis
St. Louis, Missouri
November 18, 2021
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
How RPA Help in the Transportation and Logistics Industry.pptxSynapseIndia
Revolutionize your transportation processes with our cutting-edge RPA software. Automate repetitive tasks, reduce costs, and enhance efficiency in the logistics sector with our advanced solutions.
Cookies program to display the information though cookie creation
H2O - the optimized HTTP server
1. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
H2O
the optimized HTTP server
DeNA Co., Ltd.
Kazuho Oku
1
2. Who am I?
n long experience in network-‐‑‒related / high-‐‑‒
performance programming
n works in the field:
⁃ Palmscape / Xiino
• world's first web browser for Palm OS, bundled by
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Sony, IBM, NTT DoCoMo
⁃ MySQL extensions: Q4M, mycached, …
• MySQL Conference Community Awards (as DeNA)
⁃ JSX
• altJS with an optimizing compiler
H2O -‐‑‒ the optimized HTTP server2
3. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Agenda
n Introduction of H2O
n The motives behind
n Writing a fast server
n Writing H2O modules
n Current status the future
n Questions regarding HTTP/2
H2O -‐‑‒ the optimized HTTP server3
4. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Introducing H2O
H2O -‐‑‒ the optimized HTTP server4
5. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
H2O – the umbrella project
n h2o – the standalone HTTP server
⁃ libh2o – can be used as a library as well
n picohttpparser – the HTTP/1 parser
n picotest – TAP-‐‑‒compatible testing library
n qrintf – C preprocessor for optimizing s(n)printf
n yoml – DOM-‐‑‒like wrapper for libyaml
github.com/h2o
H2O -‐‑‒ the optimized HTTP server5
6. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
h2o
n the standalone HTTP server
n protocols:
⁃ HTTP/1.x
⁃ HTTP/2
• via Upgrade, NPN, ALPN, direct
⁃ WebSocket (uses wslay)
⁃ with SSL support (uses OpenSSL)
n modules:
⁃ file (static files), reverse-‐‑‒proxy, reproxy, deflate
n configuration using yaml
H2O -‐‑‒ the optimized HTTP server6
7. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
libh2o
n h2o is also available as a library
n event loop can be selected
⁃ libuv
⁃ h2o's embedded event loop
n configurable via API and/or yaml
⁃ dependency to libyaml is optional
H2O -‐‑‒ the optimized HTTP server7
9. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Testing
n two levels of testing for better quality
⁃ essential for keeping the protocol
implementations and module-‐‑‒level API apart
n unit-‐‑‒testing
⁃ every module has (can have) it's own unit-‐‑‒test
⁃ tests run using the loopback protocol handler
• module-‐‑‒level unit-‐‑‒tests do not depend on the
protocol
n end-‐‑‒to-‐‑‒end testing
⁃ spawns the server and connect via network
⁃ uses nghttp2
H2O -‐‑‒ the optimized HTTP server9
10. Internals
n uses h2o_buf_t (pair of [char*, size_̲t]) is used to
represent data
⁃ common header names are interned into tokens
• those defined in HPACK static_̲table + α
n mostly zero-‐‑‒copy
n incoming data allocated using: malloc, realloc,
mmap
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ requires 64-‐‑‒bit arch for heavy use
n uses writev for sending data
H2O -‐‑‒ the optimized HTTP server10
11. 6
bytes
1,024
bytes
10,240
bytes
6
bytes
1,024
bytes
10,240
bytes
6
bytes
1,024
bytes
10,240
bytes
6
bytes
1,024
bytes
10,240
bytes
HTTP/1
(local;
osx)
HTTP/1
(local;
linux)
HTTP/1
(remote;
linux)
HTTPS/1
(remote;
linux)
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Fast
120,000
100,000
80,000
60,000
40,000
20,000
0
Requests
/
second.core
nginx-‐1.7.7
h2o
Note:
used
MacBook
Pro
Early
2014
(Core
i7@2.4GHz),
Amazon
EC2
cc2.8xlarge,
no
logging
H2O -‐‑‒ the optimized HTTP server11
12. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Why is it fast?
Why should it be fast?
H2O -‐‑‒ the optimized HTTP server12
13. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
It all started with PSGI/Plack
n PSGI/Plack is the WSGI/Rack for Perl
n on Sep 7th 2010:
⁃ first commit to github.com/plack/Plack
⁃ I asked: why ever use FastCGI?
• at the time, HTTP was believed to be slow, and
FastCGI is necessary
⁃ the other choice was to use Apache+mod_̲perl
⁃ I proposed:
• write a fast HTTP parser in C, and use it from Perl
• get rid of specialized protocols / tightly-‐‑‒coupled
legacy servers
⁃ for ease of dev., H2O -‐‑‒ the optimized HTTP server deploy., admin.13
14. So I wrote HTTP::Parser::XS and picohttpparser.
H2O -‐‑‒ the optimized HTTP server14
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
15. How fast is picohttpparser?
n 10x faster than http-‐‑‒parser according to 3p bench.
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ github.com/fukamachi/fast-‐‑‒http
HTTP
Parser
Performance
Comparison
329,033
3,162,745
3,500,000
3,000,000
2,500,000
2,000,000
1,500,000
1,000,000
500,000
0
hYp-‐parser@5fd51fd
picohYpparser@56975cd
requests
/
second
H2O -‐‑‒ the optimized HTTP server15
16. HTTP::Parser::XS
n the de-‐‑‒facto HTTP parser used by PSGI/Plack
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ PSGI/Plack is the WSGI/Rack for Perl
n modern Perl-‐‑‒based services rarely use FastCGI or
mod_̲perl
n the application servers used (Starlet, Starman, etc.)
speak HTTP using HTTP::Parser::XS
⁃ application servers can be and in fact are written
in Perl, since the slow part is handled by
HTTP::Parser::XS
n picohttpparser is the C-‐‑‒based backend of
HTTP::Parser::XS
H2O -‐‑‒ the optimized HTTP server16
17. The lessons learned
n using one protocol (HTTP) everywhere reduces the
TCO
⁃ easier to develop, debug, test, monitor,
administer
⁃ popular protocols tend to be better designed
implemented thanks to the competition
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
n similar transition happens everywhere
⁃ WAP has been driven out by HTTP HTML
⁃ we rarely use FTP these days
H2O -‐‑‒ the optimized HTTP server17
18. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
but HTTP is not yet used everywhere
n web browser
⁃ HTTP/1 is used now, transiting to HTTP/2
n SOA / microservices
⁃ HTTP/1 is used now
• harder to transit to HTTP/2 since many proglangs
use blocking I/O
⁃ other protocols coexist: RDBMS, memcached, …
• are they the next target of HTTP (like FastCGI?)
n IoT
• MQTT is emerging
H2O -‐‑‒ the optimized HTTP server18
19. So I decided to write H2O
n in July 2014
n life of the developers becomes easier if all the
services use HTTP
n but for the purpose, it seems like we need to raise
the bar (of performance)
⁃ or other protocols may emerge / continue to be
used
n now (at the time of transition to HTTP/2) might be a
good moment to start a performance race between
HTTP implementers
H2O -‐‑‒ the optimized HTTP server19
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
20. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Writing a fast server
H2O -‐‑‒ the optimized HTTP server20
21. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Two things to be aware of
n characteristics of a fast program
1. executes less instructions
• speed is a result of simplicity, not complexity
2. causes less pipeline hazards
• minimum number of conditional branches / indirect
calls
• use branch-‐‑‒predictor-‐‑‒friendly logic
⁃ e.g. conditional branch exists, but it is taken
95%
H2O -‐‑‒ the optimized HTTP server21
22. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
H2O -‐‑‒ design principles
n do it right
⁃ local bottlenecks can be fixed afterwards
⁃ large-‐‑‒scale design issues are hard to notice / fix
n do it simple
⁃ as explained
⁃ provide / use hooks only at high-‐‑‒level
• hooks exist for: protocol, generator, filter, logger
H2O -‐‑‒ the optimized HTTP server22
23. The performance pitfalls
n many server implementations spend CPU cycles in
the following areas:
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ memory allocation
⁃ parsing input
⁃ stringifying output and logs
⁃ timeout handling
H2O -‐‑‒ the optimized HTTP server23
24. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Memory allocation
H2O -‐‑‒ the optimized HTTP server24
25. Memory allocation in H2O
n uses region-‐‑‒based memory management
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ memory pool of Apache
n strategy:
⁃ memory block is assigned to the Request object
⁃ small allocations returns portions of the block
⁃ memory is never returned to the block
⁃ The entire memory block gets freed when the
Request object is destroyed
H2O -‐‑‒ the optimized HTTP server25
26. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Memory allocation in H2O (cont'd)
n malloc (of small chunks)
void *h2o_mempool_alloc(h2o_mempool_t *pool, size_t sz)!
{!
(snip)!
void *ret = pool-chunks-bytes + pool-chunks-offset;!
pool-chunks-offset += sz;!
return ret;!
} !
n free
⁃ no code (as explained)
H2O -‐‑‒ the optimized HTTP server26
27. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Parsing input
H2O -‐‑‒ the optimized HTTP server27
28. Parsing input
n HTTP/1 request parser may or may not be a
bottleneck, depending on its performance
⁃ if the parser is capable of handling 1M reqs/sec,
then it will spend 10% of time if the server
handles 100K reqs/sec.
3,500,000
3,000,000
2,500,000
2,000,000
1,500,000
1,000,000
500,000
H2O -‐‑‒ the optimized HTTP server28
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
329,033
3,162,745
0
hYp-‐parser@5fd51fd
picohYpparser@56975cd
requests
/
second
HTTP/1
Parser
Performance
Comparison
29. Parsing input (cont'd)
n it's good to know the logical upper-‐‑‒bound
⁃ or we might try to optimize something that can
no more be faster
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
n Q. How fast could a text parser be?
H2O -‐‑‒ the optimized HTTP server29
30. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Q. How fast could a text server be?
Answer: around 1GB/sec. is a good target
⁃ since any parser needs to read every byte and
execute a conditional branch depending on the
value
• # of instructions: 1 load + 1 inc + 1 test + 1
conditional branch
• would likely take several CPU cycles (even if
superscalar)
• unless we use SIMD instructions
H2O -‐‑‒ the optimized HTTP server30
31. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Parsing input
n What's wrong with this parser?
for (; s != end; ++s) {!
int ch = *s;!
switch (ctx.state) {!
case AAA:!
if (ch == ' ')!
ctx.state = BBB;!
break;!
case BBB:!
...!
}!
H2O -‐‑‒ the optimized HTTP server31
32. Parsing input (cont'd)
n never write a character-‐‑‒level state machine if
performance matters
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
for (; s != end; ++s) {!
int ch = *s;!
switch (ctx.state) { // ß executed for every char!
case AAA:!
if (ch == ' ')!
ctx.state = BBB;!
break;!
case BBB:!
...!
}!
H2O -‐‑‒ the optimized HTTP server32
33. Parsing input fast
n each state should consume a sequence of bytes
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
while (s != end) {!
switch (ctx.state) {!
case AAA:!
do {!
if (*s++ == ' ') {!
ctx.state = BBB;!
break;!
}!
} while (s != end);!
break;!
case BBB:!
...
H2O -‐‑‒ the optimized HTTP server33
34. Stateless parsing
n stateless in the sense that no state value exists
⁃ stateless parsers are generally faster than
stateful parsers, since it does not have state -‐‑‒ a
variable used for a conditional branch
n HTTP/1 parsing can be stateless since the request-‐‑‒
line and the headers arrive in a single packet (in
most cases)
⁃ and even if they did not, it is easy to check if the
end-‐‑‒of-‐‑‒headers has arrived (by looking for CR-‐‑‒
LF-‐‑‒CR-‐‑‒LF) and then parse the input
• this countermeasure is essential to handle the
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Slowloris attack
H2O -‐‑‒ the optimized HTTP server34
35. picohttpparser is stateless
n states are the execution contexts (instead of being a
variable)
const char* parse_request(const char* buf, const char* buf_end, …)!
{!
/* parse request line */!
ADVANCE_TOKEN(*method, *method_len);!
++buf;!
ADVANCE_TOKEN(*path, *path_len);!
++buf;!
if ((buf = parse_http_version(buf, buf_end, minor_version, ret)) == NULL)!
return NULL;!
EXPECT_CHAR('015');!
EXPECT_CHAR('012');!
return parse_headers(buf, buf_end, headers, num_headers, max_headers, …);!
}!
H2O -‐‑‒ the optimized HTTP server35
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
36. loop exists within a function (≒state)
n the code looks for the end of the header value
#define IS_PRINTABLE(c) ((unsigned char)(c) - 040u 0137u)!
!
static const char* get_token_to_eol(const char* buf, const char* buf_end, …!
{!
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
while (likely(buf_end - buf = 8)) {!
#define DOIT() if (unlikely(! IS_PRINTABLE(*buf))) goto NonPrintable; ++buf!
DOIT(); DOIT(); DOIT(); DOIT();!
DOIT(); DOIT(); DOIT(); DOIT();!
#undef DOIT!
continue;!
NonPrintable:!
if ((likely((uchar)*buf '040') likely(*buf != '011'))!
|| unlikely(*buf == '177'))!
goto FOUND_CTL;!
}
H2O -‐‑‒ the optimized HTTP server36
37. The hottest loop of picohttpparser (cont'd)
n after compilation, uses 4 instructions per char
movzbl (%r9), %r11d!
movl %r11d, %eax!
addl $-32, %eax!
cmpl $94, %eax!
ja LBB5_5!
movzbl 1(%r9), %r11d // load char!
leal -32(%r11), %eax // subtract!
cmpl $94, %eax // and check if is printable!
ja LBB5_4 // if not, break!
movzbl 2(%r9), %r11d // load next char!
leal -32(%r11), %eax // subtract!
cmpl $94, %eax // and check if is printable!
ja LBB5_15 // if not, break!
movzbl 3(%r9), %r11d // load next char!
…
H2O -‐‑‒ the optimized HTTP server37
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
38. strlen
vs.
picoh?pparser
strlen
(simple)
picohYpparser@56975cd
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
strlen vs. picohttparser
n not as fast as strlen, but close
size_t strlen(const char *s) {!
const char *p = s;!
for (; *p != '0'; ++p)!
;!
return p - s;!
}!
n !
not much room
!
left for further
optimization (wo.
using SIMD
insns.)!
!
0.90
0.80
0.70
0.60
0.50
0.40
0.30
0.20
0.10
0.00
bytes
/
clock
H2O -‐‑‒ the optimized HTTP server38
39. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
picohttpparser is small and simple
$ wc picohttpparser.?!
376 1376 10900 picohttpparser.c!
62 333 2225 picohttpparser.h!
438 1709 13125 total!
$ !
!
n good example of do-‐‑‒it-‐‑‒simple-‐‑‒for-‐‑‒speed approach
⁃ H2O (incl. the HTTP/2 parser) is designed using
the approach
H2O -‐‑‒ the optimized HTTP server39
40. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Stringification
H2O -‐‑‒ the optimized HTTP server40
41. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Stringification
n HTTP/1 responses are in strings
sprintf(buf, HTTP/1.%d %d %srn, …)!
n s(n)printf is known to be slow
⁃ but the interface is great
⁃ it's tiresome to write like:
p = strappend_s(p, HTTP/1.);!
p = strappend_n(p, minor_version);!
*p++ = ' ';!
P = strappend_n(p, status);!
*p++ = ' ';!
p = strappend_s(p, reason);!
p = strappend_s(p, rn);
H2O -‐‑‒ the optimized HTTP server41
42. Stringification (cont'd)
n stringification is important for HTTP/2 servers too
⁃ many elements still need to be stringified
• headers (status, date, last-‐‑‒modified, etag, …)
• access log (IP address, date, # of bytes, …)
H2O -‐‑‒ the optimized HTTP server42
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
43. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Why is s(n)printf slow?
n it's a state machine
⁃ interprets the format string (e.g. hello: %s) at
runtime
n it uses the locale
⁃ not for all types of variables, but…
n it uses varargs
n it's complicated
⁃ sprintf may parse a number when used for
stringifying a number
sprintf(buf, %11d, status)!
H2O -‐‑‒ the optimized HTTP server43
44. How should we optimize s(n)printf?
n by compiling the format string at compile-‐‑‒time
⁃ instead of interpreting it at runtime
⁃ possible since the supplied format string is
almost always a string literal
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
n and that's qrintf
H2O -‐‑‒ the optimized HTTP server44
45. qrintf
n qrintf is a preprocessor that rewrites s(n)printf
invocations to set of functions calls specialized to
each format string
n qrintf-‐‑‒gcc is a wrapper of GCC that
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ first applies the GCC preprocessor
⁃ then applies the qrintf preprocessor
⁃ then calls the GCC compiler
n similar wrapper could be implemented for Clang
⁃ but it's a bit harder
⁃ help wanted!
H2O -‐‑‒ the optimized HTTP server45
46. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Example
// original code (248 nanoseconds)!
snprintf(buf, sizeof(buf), %u.%u.%u.%u, !
(addr 24) 0xff, (addr 16) 0xff, (addr 8) 0xff, addr 0xff);!
!
// after preprocessed by qrintf (21.5 nanoseconds)!
_qrintf_chk_finalize(!
_qrintf_chk_u(_qrintf_chk_c(!
_qrintf_chk_u(_qrintf_chk_c(!
_qrintf_chk_u(_qrintf_chk_c(!
_qrintf_chk_u(!
_qrintf_chk_init(buf, sizeof(buf)), (addr 24) 0xff),!
'.'), (addr 16) 0xff),!
'.'), (addr 8) 0xff),!
'.'), addr 0xff));
H2O -‐‑‒ the optimized HTTP server46
47. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Performance impact on H2O
n 20% performance gain
⁃ gcc: 82,900 reqs/sec
⁃ qrintf-‐‑‒gcc: 99,200 reqs/sec.
n benchmark condition:
⁃ 6-‐‑‒byte file GET over HTTP/1.1
⁃ access logging to /dev/null
H2O -‐‑‒ the optimized HTTP server47
48. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Timeout handling
H2O -‐‑‒ the optimized HTTP server48
49. Timeout handling by the event loops
n most event loops use balanced trees to handle
timeouts
⁃ so that timeout events can be triggered fast
⁃ cons. is that it takes time to set the timeouts
n in case of HTTP, timeout should be set at least once
per request
⁃ otherwise the server cannot close a stale
connection
H2O -‐‑‒ the optimized HTTP server49
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
50. Timeout requirements of a HTTP server
n much more set than triggered
⁃ is set more than once per request
⁃ most requests succeed before timeout
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
n the timeout values are uniform
⁃ e.g. request timeout for every connection would
be the same (or i/o timeout or whatever)
n balanced-‐‑‒tree does not seem like a good approach
⁃ any other choice?
H2O -‐‑‒ the optimized HTTP server50
51. Use pre-‐‑‒sorted link-‐‑‒list
n H2O maintains a linked-‐‑‒list for each timeout
configuration
⁃ request timeout has its own linked-‐‑‒list, i/o
timeout has its own, …
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
n how to set the timeout:
⁃ timeout entry is inserted at the end of the linked-‐‑‒
list
• thus the list is naturally sorted
n how the timeouts get triggered:
⁃ H2O iterates from the start of each linked-‐‑‒list,
and triggers those that have timed-‐‑‒out
H2O -‐‑‒ the optimized HTTP server51
52. note:
N:
number
of
]meout
entries,
M:
number
of
]meout
configura]ons,
trigger
performance
of
list
of
linked-‐list
can
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Comparison Chart
OperaAon
(frequency
in
HTTPD)Balanced-‐treeList
of
linked-‐list
set
(high)O(log
N)O(1)
clear
(high)O(log
N)O(1)
trigger
(low)O(1)O(M)
be
reduced
to
O(1)
H2O -‐‑‒ the optimized HTTP server52
53. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Miscellaneous
H2O -‐‑‒ the optimized HTTP server53
54. Miscellaneous
n the entire stack of H2O is carefully designed (for
simplicity and for performance)
⁃ for example, the built-‐‑‒in event loop of H2O
(which is the default for h2o), is faster than libuv
0
10,000
20,000
30,000
40,000
50,000
60,000
70,000
80,000
H2O -‐‑‒ the optimized HTTP server54
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
6
bytes
4,096
bytes
requests
/
sec.core
size
of
content
Benchmark:
libuv
vs.
internal
libuv-‐network-‐and-‐file@7876f53
libuv-‐network-‐only@da85742
internal
(master@a5d1105)
55. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Writing H2O modules
H2O -‐‑‒ the optimized HTTP server55
56. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Module types of H2O
n handler
⁃ generates the contents
• e.g. file handler, proxy handler
n filter
⁃ modifies the content
• e.g. chunked encoder, deflate
⁃ can be chained
n logger
H2O -‐‑‒ the optimized HTTP server56
57. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Writing a hello world handler
static int on_req(h2o_handler_t *self, h2o_req_t *req) {!
static h2o_generator_t generator = {};!
static h2o_buf_t body = H2O_STRLIT(hello worldn);!
if (! h2o_memis(req-method.base, req-method.len, H2O_STRLIT(GET)))!
return -1;!
req-res.status = 200;!
req-res.reason = OK;!
h2o_add_header(req-pool, req-res.headers, H2O_TOKEN_CONTENT_TYPE,!
H2O_STRLIT(text/plain));!
h2o_start_response(req, generator);!
h2o_send(req, body, 1, 1);!
return 0;!
}!
!
h2o_handler_t *handler = h2o_create_handler( host_config, sizeof(*handler));!
handler-on_req = on_req;
H2O -‐‑‒ the optimized HTTP server57
58. The handler API
/**!
* called by handlers to set the generator!
* @param req the request!
* @param generator the generator!
*/!
void h2o_start_response(h2o_req_t *req, h2o_generator_t *generator);!
/**!
* called by the generators to send output!
* note: generator should close the resources opened by itself after sending the
final chunk (i.e. calling the function with is_final set to true)!
* @param req the request!
* @param bufs an array of buffers!
* @param bufcnt length of the buffers array!
* @param is_final if the output is final!
*/!
void h2o_send(h2o_req_t *req, h2o_buf_t *bufs, size_t bufcnt, int is_final);!
H2O -‐‑‒ the optimized HTTP server58
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
59. The handler API (cont'd)
/**!
* an object that generates a response.!
* The object is typically constructed by handlers that call h2o_start_response.!
*/!
typedef struct st_h2o_generator_t {!
/**!
* called by the core to request new data to be pushed via h2o_send!
*/!
void (*proceed)(struct st_h2o_generator_t *self, h2o_req_t *req);!
/**!
* called by the core when there is a need to terminate the response!
*/!
void (*stop)(struct st_h2o_generator_t *self, h2o_req_t *req);!
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
} h2o_generator_t;!
H2O -‐‑‒ the optimized HTTP server59
60. Module examples
n Simple examples exist in the examples/ dir
n lib/chunked.c is a good example of the filter API
H2O -‐‑‒ the optimized HTTP server60
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
61. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Current Status the Future
H2O -‐‑‒ the optimized HTTP server61
62. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Development Status
n core
⁃ mostly feature complete
n protocol
⁃ http/1 – mostly feature complete
⁃ http/2 – interoperable
n modules
⁃ file – complete
⁃ proxy – interoperable
• name resolution is blocking
• does not support keep-‐‑‒alive
H2O -‐‑‒ the optimized HTTP server62
63. HTTP/2 status of H2O
n interoperable, but some parts are missing
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ HPACK resize
⁃ priority handling
n priority handling is essential for HTTP/2
⁃ without, HTTP/2 is slower than HTTP/1 L
n need to tweak performance
⁃ SSL-‐‑‒related code is not yet optimized
• first benchmark was taken last Saturday J
H2O -‐‑‒ the optimized HTTP server63
64. HTTP/2 over TLS benchmark
n need to fix the dropdown, likely caused by:
⁃ H2O uses writev to gather data into a single
socket op., but OpenSSL does not provide
scatter-‐‑‒gather I/O
120,000
100,000
80,000
60,000
40,000
20,000
H2O -‐‑‒ the optimized HTTP server64
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
0
6
bytes
1,024
bytes
10,240
bytes
HTTPS/2
(remote;
linux)
nghYpd
h2o
⁃ in H2O, every file
handler has its own
buffer and pushes
content to the
protocol layer
• nghttpd pulls
instead, which is
more memory-‐‑‒
efficient / no need
65. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Goal of the project
n to become the best HTTP/2 server
⁃ with excellent performance in serving static
files / as a reverse proxy
• note: picohttpserver and other libraries are also used
in the reverse proxy implementation
n to become the favored HTTP server library
⁃ esp. for server products
⁃ to widen the acceptance of HTTP protocol even
more
H2O -‐‑‒ the optimized HTTP server65
66. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Help wanted
n looking for contributors in all areas
⁃ addition of modules might be the easiest, since it
would not interfere with the development of the
core / protocol layer
⁃ examples, docs, tests are also welcome
n it's easy to start
⁃ since the code-‐‑‒base is young and simple
Subsystemwc
–l
(incl.
unit-‐tests)
Core2,334
Library1,856
Socket
event
loop1,771
HTTP/1
(incl.
picohYpparser)886
HTTP/22,507
Modules1,906
Server573
H2O -‐‑‒ the optimized HTTP server66
67. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Questions regarding HTTP/2
H2O -‐‑‒ the optimized HTTP server67
68. Sorry, I do not have much to talk
n since it is a well-‐‑‒designed protocol
n and in terms of performance, apparently binary
protocols are easier to implement than a text
protocol J
⁃ there's a efficient algorithm for the static
Huffman decoder
• @tatsuhiro-‐‑‒t implemented it, I copied
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
n OTOH I have some questions re HTTP/2
H2O -‐‑‒ the optimized HTTP server68
69. Q. would there be a max-‐‑‒open-‐‑‒files issue?
n according to the draft, recommended value of
MAX_̲CONCURRENT_̲STREAMS is = 100
n if max-‐‑‒connections is 1024, it would mean that the
max fd would be above 10k
⁃ on linux, the default (NR_̲OPEN) is 1,048,576
and is adjustable
⁃ but on other OS?
n H2O by default limits the number of in-‐‑‒flight
requests internally to 16
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
⁃ the value is configurable
H2O -‐‑‒ the optimized HTTP server69
70. Q. good way to determine the window size?
n initial window size (64k) might be too small to
saturate the avaiable bandwidth depending on the
latency
⁃ but for responsiveness we would not want the
value to be too high
⁃ is there any recommendation on how we should
tune the variable?
H2O -‐‑‒ the optimized HTTP server70
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
71. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Q. should we continue to use CDN?
n HTTP/2 has priority control
⁃ CDN and primary website would use different
TCP connection
• means that priority control would not work bet. CDN
and the primary website
n should we better serve all the asset files from the
primary website?
H2O -‐‑‒ the optimized HTTP server71
72. Never hide the Server header
n name and version info. is essential for interoperability
⁃ many (if not all) webapps use the User-‐‑‒Agent value to
evade bugs
⁃ used to be same at the HTTP/1 layer in the early days
n there will be interoperability problems bet. HTTP/2 impls.
⁃ the Server header is essential for implementing
workarounds
n some believe that hiding the header improves security
⁃ we should speak that they are wrong; that security-‐‑‒by-‐‑‒
obscurity does not work on the Net, and hiding the
value harms interoperability and the adoption of HTTP/
2
H2O -‐‑‒ the optimized HTTP server72
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
73. Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.
Summary
H2O -‐‑‒ the optimized HTTP server73
74. Summary
n H2O is an optimized HTTP server implementation
⁃ with neat design to support both HTTP/1 and
HTTP/2
⁃ is still very young
• lots of areas to work on!
• incl. improving the HTTP/2 support
n help wanted! Let's write the HTTPD of the future!
H2O -‐‑‒ the optimized HTTP server74
Copyright
(C)
2014
DeNA
Co.,Ltd.
All
Rights
Reserved.