All Projects → romainmenke → pusher

romainmenke / pusher

Licence: LGPL-3.0 license
golang : HTTP2 Push Handler collection

Programming Languages

go
31211 projects - #10 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to pusher

django-http2-middleware
⚡️Django middleware to automatically send preload headers before views runs, enabling faster HTTP2 server-push (with CSP support).
Stars: ✭ 65 (+333.33%)
Mutual labels:  http2, http2-push
Jetty.project
Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Stars: ✭ 3,260 (+21633.33%)
Mutual labels:  http2, http2-push
Http2Pusher
PHP Http2 Server Push
Stars: ✭ 27 (+80%)
Mutual labels:  http2, http2-push
Roadrunner
🤯 High-performance PHP application server, load-balancer and process manager written in Golang
Stars: ✭ 6,122 (+40713.33%)
Mutual labels:  http2, http2-push
Vulcain
Fast and idiomatic client-driven REST APIs.
Stars: ✭ 3,190 (+21166.67%)
Mutual labels:  http2, http2-push
Faygo
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc.
Stars: ✭ 1,557 (+10280%)
Mutual labels:  http2, http2-push
Simple Httpd
Drop-in replacement for Python SimpleHTTPServer. Provides TLS via Let's Encrypt over HTTP2, and auto generated self-signed certificates.
Stars: ✭ 217 (+1346.67%)
Mutual labels:  http2
serverpush-serviceworkers-example
HTTP/2 Server Push & Service Workers example
Stars: ✭ 18 (+20%)
Mutual labels:  http2
Tcpprobe
Modern TCP tool and service for network performance observability.
Stars: ✭ 207 (+1280%)
Mutual labels:  http2
Apns Http2
A Java library for sending notifications via APNS using Apple's HTTP/2 API.
Stars: ✭ 194 (+1193.33%)
Mutual labels:  http2
http2-client
A native HTTP2 client in Haskell
Stars: ✭ 41 (+173.33%)
Mutual labels:  http2
restish
Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in
Stars: ✭ 453 (+2920%)
Mutual labels:  http2
Go Http Tunnel
Fast and secure tunnels over HTTP/2
Stars: ✭ 2,786 (+18473.33%)
Mutual labels:  http2
Cowlib
Support library for manipulating Web protocols.
Stars: ✭ 219 (+1360%)
Mutual labels:  http2
minicrawler
Multiplexing web client supporting HTTP/2 and WHATWG URL compliant parser written in C
Stars: ✭ 21 (+40%)
Mutual labels:  http2
Grizzly
Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO framework has been designed to help developers to take advantage of the Java™ NIO API.
Stars: ✭ 209 (+1293.33%)
Mutual labels:  http2
nodefony
nodefony core framework
Stars: ✭ 19 (+26.67%)
Mutual labels:  http2
Http2 Prioritization Issues
Tracks issues / notes for HTTP/2 prioritization across browsers, CDNs and servers
Stars: ✭ 204 (+1260%)
Mutual labels:  http2
Polyphony
Fine-grained concurrency for Ruby
Stars: ✭ 234 (+1460%)
Mutual labels:  http2
esa-httpclient
An asynchronous event-driven HTTP client based on netty.
Stars: ✭ 82 (+446.67%)
Mutual labels:  http2

Build Status Go Report Card codecov GoDoc

H2 Push Handlers

pusher is a collection of http.Handler's to easily enable HTTP2 Push.

  • link : a H2 Push handler based on Link headers.
  • casper : CASPer handler.
  • rules : Simple rules to generate Link headers or pushes.
  • parser : html body parser -> generates Push Frames / Link Headers for you.

Checkout the sub-packages for more details.


You probably already saw this code snippet from the go blog :

    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
        if pusher, ok := w.(http.Pusher); ok {
            // Push is supported.
            if err := pusher.Push("/app.js", nil); err != nil {
                log.Printf("Failed to push: %v", err)
            }
        }
        // ...
    })

But obviously you don't want to hard code pushes for all your assets, especially in case of a proxy. That is where these handlers come in. Just choose the right one for the job.

Proxy Server

If you run a proxy server and want to enable H2 Push for all requests coming through, you implement the link pkg Handler and add Link headers on the source server. This approach is based on how Cloudflare enables H2 Push.

Client Side Rendered

Client Side Rendered websites often have known critical assets like the js bundle. In this case it makes sense to have a couple of rules for which assets to push for a certain path. This is what the rules pkg does. It adds Link headers or sends Pushes depending on your setup based on simple rules.

Server Side Rendered

A Server Side Rendered website with a CMS doesn't have known critical assets at deploy time. The parser pkg reads the first 1024 bytes from every html response and adds Link headers or sends Pushes depending on your setup.


The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].