SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Go 1.8 新 联网 features
सैफी खान
saifi@ACM.org
New Networking
Warm up
package main
import "net/http"
func main() {
_, err := http.Get(`https://graph.facebook.com//v2.4/oauth/access_token`)
if err != nil {
panic(err.Error())
}
}
(22 hrs ago) https://github.com/golang/go/issues/19103
Warm up
package main
import "net/http"
func main() {
_, err := http.Get(`https://graph.facebook.com//v2.4/oauth/access_token`)
if err != nil {
panic(err.Error())
}
}
(22 hrs ago) https://github.com/golang/go/issues/19103
x/net/http2: requests with absolute URIs in URL.Opaque produce incorrect :path header
#16847 (2016-08-16)
setup
SYN attack
tear-down
TLS exchange
socket
message
response
Server Client
Packets via intermediate device
Ataleoftwoprotocols
One TCP connection.
Request → Stream
Streams are multiplexed
Streams are prioritized
Binary Framing Layer
Prioritization
Flow Control
Server Push
Header Compression
HTTP/2 Server Push
What does all this mean for Go ?
● You got to make “changes” in the library.
● Lots of “small” changes
– Tools
– Libraries
–
● “Context” is critical.
Context
● A Context carries
– a deadline
– a cancelation signal
– and other values across API boundaries.
● Context's methods may be called by multiple
goroutines simultaneously.
Fix
● The fix tool has a new “context” fix to change
imports from “golang.org/x/net/context” to
“context”.
Pprof
● The pprof tool can now profile TLS servers and
skip certificate validation by using the
“https+insecure” URL scheme.
Vet
● Vet now checks for copying an array of locks,
duplicate JSON and XML struct field tags, non-
space-separated struct tags, deferred calls to
HTTP Response.Body.Close before
checking errors, and indexed arguments in
Printf.
HTTP Server Graceful Shutdown
● The HTTP Server now has support for
– graceful shutdown using the new
Server.Shutdown method
– abrupt shutdown using the new Server.Close
method.
HTTP/2 Push
● The net/http package now includes a
mechanism to send HTTP/2 server pushes from
a Handler.
● Similar to the existing Flusher and Hijacker
interfaces, an HTTP/2 ResponseWriter now
implements the new Pusher interface.
Context is gonna be HUGE
● new Server.Shutdown takes a context
argument.
● significant additions to the database/sql package
with context support.
● All nine of the new Lookup methods on the new
net.Resolver now take a context.
●
crypto/tls
● Conn.CloseWrite allows TLS connections to be
half closed
● Config.Clone clones a TLS configuration.
● Config.GetClientCertificate callback allows
selecting a client certificate based on the
server's TLS CertificateRequest message,
represented by the new CertificateRequestInfo
● Config.KeyLogWriter allows debugging TLS
connections in WireShark
● … more
crypto/x509
● PSS signatures are now supported.
● UnknownAuthorityError now has a Cert
field, reporting the untrusted certificate.
● Certificate validation is more permissive in a few
cases and stricter in a few other cases.
● Root certificates will now also be looked for at
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
on Linux, to support RHEL and CentOS.
expvar
● Package expvar provides a standardized
interface to public variables
● operation counters in servers.
● exposed via HTTP at /debug/vars in JSON
format.
● new Handler function returns the package's
HTTP handler, to enable installing it in non-
standard locations.
func Handler() http.Handler
net
● The new Buffers type permits writing to the
network more efficiently from multiple
discontiguous buffers in memory
● cf. writev
● Scatter – gather
https://linux.die.net/man/2/writev
●
net/http/httptrace
● support for tracing a client request's TLS
handshakes
– ClientTrace.TLSHandshakeStart
– ClientTrace.TLSHandshakeDone
net/http
● graceful shutdown support
● Server adds configuration options
– ReadHeaderTimeout
– IdleTimeout
– and documents WriteTimeout
● FileServer and ServeContent now support HTTP
If-Match conditional requests (RFC 7232)
net/http … server .. Handler
● Context returned by Request.Context is
canceled if the underlying net.Conn closes. For
instance, if the user closes their browser in the
middle of a slow request
● Handler can now detect that the user is gone.
This complements the existing CloseNotifier
support.
● Handler can now abort a response by panicking
with the error ErrAbortHandler.
net/http … server .. Handler
● To serve trailers produced after the header has
already been written, see the new TrailerPrefix
mechanism.
● Write of zero bytes to a ResponseWriter is now
defined as a way to test whether a
ResponseWriter has been hijacked
● If so, the Write returns ErrHijacked without
printing an error to the server's error log.
net/http … Client
● Client now copies most request headers on
redirect.
● Client now supports 301, 307, and 308 redirects.
● Client.Post now follows 301 redirects, converting
them to GET requests without bodies
● If the redirect requires resending the request
body, the request must have the new
Request.GetBody field defined.
● NewRequest sets Request.GetBody
automatically for common body types.
net/http … Transport
● Transport now supports international domain
names.
● Get and other helpers.
● Transport now rejects requests for URLs with
ports containing non-digit characters.
● DefaultTransport.Dialer now enables DualStack
● Transport no longer reads a byte of a non-nil
Request.Body when the Request.ContentLength
is zero to determine whether the ContentLength
is actually zero or just undefined.
empty interface
● interface {} may hold values of ANY type
References {URL}
● Go 1.8 release notes
https://tip.golang.org/doc/go1.8
● HTTP/2 spec
http://http2.github.io/http2-spec/index.html
● RSA PSS (Probabilistic Signature Scheme)
https://www.emc.com/emc-plus/rsa-labs/historical/ra
●
Legal { Attribution(s) }
● The usage of images is purely educational. The
copyright for the images resides with their
respective authros.
● Released under Creative Commons 4.0 Non-
Commercial Share-Alike
we use
4.0
let's connect
StrikrHQ.comStrikr.in
https://twitter.com/StrikrHQ
https://plus.google.com/+StrikrHQ
https://facebook.com/StrikrHQ
https://github.com/strikr
https://hub.docker.com/r/strikr/
https://linkedin.com/company/strikr
https://webchat.freenode.net/?channels=%23strikr#strikr
https://bitbucket.org/strikr/
projects@

Más contenido relacionado

La actualidad más candente

Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesSreenivas Makam
 
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017Ranjith Rajaram
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Nicolas De Loof
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPChris Tankersley
 
Logs/Metrics Gathering With OpenShift EFK Stack
Logs/Metrics Gathering With OpenShift EFK StackLogs/Metrics Gathering With OpenShift EFK Stack
Logs/Metrics Gathering With OpenShift EFK StackJosef Karásek
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 PresentationSreenivas Makam
 
Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettDocker, Inc.
 
Fluentd and PHP
Fluentd and PHPFluentd and PHP
Fluentd and PHPchobi e
 
Istio Playground
Istio PlaygroundIstio Playground
Istio PlaygroundQAware GmbH
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructureSergiy Kukunin
 
Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Chris Tankersley
 
Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Chris Tankersley
 
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015Van Phuc
 
青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker RegistryZhichao Liang
 
Logging & Metrics with Docker
Logging & Metrics with DockerLogging & Metrics with Docker
Logging & Metrics with DockerStefan Zier
 
A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13Thibault Charbonnier
 

La actualidad más candente (20)

Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
 
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
Statyczna analiza kodu PHP
Statyczna analiza kodu PHPStatyczna analiza kodu PHP
Statyczna analiza kodu PHP
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHP
 
Logs/Metrics Gathering With OpenShift EFK Stack
Logs/Metrics Gathering With OpenShift EFK StackLogs/Metrics Gathering With OpenShift EFK Stack
Logs/Metrics Gathering With OpenShift EFK Stack
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 
Logging & Docker - Season 2
Logging & Docker - Season 2Logging & Docker - Season 2
Logging & Docker - Season 2
 
Taming AEM deployments
Taming AEM deploymentsTaming AEM deployments
Taming AEM deployments
 
Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan Hazlett
 
Fluentd and PHP
Fluentd and PHPFluentd and PHP
Fluentd and PHP
 
Istio Playground
Istio PlaygroundIstio Playground
Istio Playground
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017
 
From a cluster to the Cloud
From a cluster to the CloudFrom a cluster to the Cloud
From a cluster to the Cloud
 
Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016
 
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015
 
青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry
 
Logging & Metrics with Docker
Logging & Metrics with DockerLogging & Metrics with Docker
Logging & Metrics with Docker
 
A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13
 

Destacado

Reflection in Go
Reflection in GoReflection in Go
Reflection in Gostrikr .
 
Payments Trends 2017
Payments Trends 2017Payments Trends 2017
Payments Trends 2017Capgemini
 
контролінг інвестиційних проектів
контролінг інвестиційних проектівконтролінг інвестиційних проектів
контролінг інвестиційних проектівav47840
 
Windows環境でのMySQL
Windows環境でのMySQLWindows環境でのMySQL
Windows環境でのMySQLyoyamasaki
 
Millennials on coffee
Millennials on coffeeMillennials on coffee
Millennials on coffeeMinio Studio
 
La innovación en la educación superior
La innovación en la educación superiorLa innovación en la educación superior
La innovación en la educación superiorCarlos Marcelo
 
Making the most of social media | promoting your Pride event
Making the most of social media | promoting your Pride eventMaking the most of social media | promoting your Pride event
Making the most of social media | promoting your Pride eventAlex Webb
 
What's Next on the Digital Horizon #bisummit - Noteworthy Moments
What's Next on the Digital Horizon #bisummit - Noteworthy Moments What's Next on the Digital Horizon #bisummit - Noteworthy Moments
What's Next on the Digital Horizon #bisummit - Noteworthy Moments Heidi Forbes Öste, PhD
 
Acessibilidade Web Cognitiva
Acessibilidade Web CognitivaAcessibilidade Web Cognitiva
Acessibilidade Web CognitivaTalita Pagani
 
【2016.06】cvpaper.challenge2016
【2016.06】cvpaper.challenge2016【2016.06】cvpaper.challenge2016
【2016.06】cvpaper.challenge2016cvpaper. challenge
 
Hechos de los apostoles
Hechos de los apostolesHechos de los apostoles
Hechos de los apostolesAda Torres
 
Introducción a jupyter (antes i python notebook)
Introducción a jupyter (antes i python notebook)Introducción a jupyter (antes i python notebook)
Introducción a jupyter (antes i python notebook)Juan Rodríguez
 
A basic guide to cosmetic formulation
A basic guide to cosmetic formulationA basic guide to cosmetic formulation
A basic guide to cosmetic formulationNgan Nguyen
 
Biological control of aflatoxins in maize and groundnut through use of aflasa...
Biological control of aflatoxins in maize and groundnut through use of aflasa...Biological control of aflatoxins in maize and groundnut through use of aflasa...
Biological control of aflatoxins in maize and groundnut through use of aflasa...africa-rising
 

Destacado (20)

Reflection in Go
Reflection in GoReflection in Go
Reflection in Go
 
Payments Trends 2017
Payments Trends 2017Payments Trends 2017
Payments Trends 2017
 
контролінг інвестиційних проектів
контролінг інвестиційних проектівконтролінг інвестиційних проектів
контролінг інвестиційних проектів
 
El arte de hacer un pitch
El arte de hacer un pitchEl arte de hacer un pitch
El arte de hacer un pitch
 
Windows環境でのMySQL
Windows環境でのMySQLWindows環境でのMySQL
Windows環境でのMySQL
 
Ramorum2016 final
Ramorum2016 finalRamorum2016 final
Ramorum2016 final
 
Millennials on coffee
Millennials on coffeeMillennials on coffee
Millennials on coffee
 
La innovación en la educación superior
La innovación en la educación superiorLa innovación en la educación superior
La innovación en la educación superior
 
Making the most of social media | promoting your Pride event
Making the most of social media | promoting your Pride eventMaking the most of social media | promoting your Pride event
Making the most of social media | promoting your Pride event
 
What's Next on the Digital Horizon #bisummit - Noteworthy Moments
What's Next on the Digital Horizon #bisummit - Noteworthy Moments What's Next on the Digital Horizon #bisummit - Noteworthy Moments
What's Next on the Digital Horizon #bisummit - Noteworthy Moments
 
Acessibilidade Web Cognitiva
Acessibilidade Web CognitivaAcessibilidade Web Cognitiva
Acessibilidade Web Cognitiva
 
Parques Biblioteca medellin
Parques Biblioteca   medellinParques Biblioteca   medellin
Parques Biblioteca medellin
 
Presentation1 (kesehatan dalam islam)
Presentation1 (kesehatan dalam islam)Presentation1 (kesehatan dalam islam)
Presentation1 (kesehatan dalam islam)
 
【2016.06】cvpaper.challenge2016
【2016.06】cvpaper.challenge2016【2016.06】cvpaper.challenge2016
【2016.06】cvpaper.challenge2016
 
Drawing development
Drawing developmentDrawing development
Drawing development
 
Hechos de los apostoles
Hechos de los apostolesHechos de los apostoles
Hechos de los apostoles
 
Introducción a jupyter (antes i python notebook)
Introducción a jupyter (antes i python notebook)Introducción a jupyter (antes i python notebook)
Introducción a jupyter (antes i python notebook)
 
A basic guide to cosmetic formulation
A basic guide to cosmetic formulationA basic guide to cosmetic formulation
A basic guide to cosmetic formulation
 
Biological control of aflatoxins in maize and groundnut through use of aflasa...
Biological control of aflatoxins in maize and groundnut through use of aflasa...Biological control of aflatoxins in maize and groundnut through use of aflasa...
Biological control of aflatoxins in maize and groundnut through use of aflasa...
 
UD4. MENDEL I LES LLEIS DE L'HERÈNCIA
UD4. MENDEL I LES LLEIS DE L'HERÈNCIAUD4. MENDEL I LES LLEIS DE L'HERÈNCIA
UD4. MENDEL I LES LLEIS DE L'HERÈNCIA
 

Similar a Go 1.8 'new' networking features

Socket programming, and openresty
Socket programming, and openrestySocket programming, and openresty
Socket programming, and openrestyTavish Naruka
 
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Codemotion
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Codemotion
 
202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUPRonald Hsu
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCLFastly
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hostingwebhostingguy
 
Juglouvain http revisited
Juglouvain http revisitedJuglouvain http revisited
Juglouvain http revisitedmarctritschler
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)Marcel Cattaneo
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)Ericom Software
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to EthereumArnold Pham
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and CaliforniumJulien Vermillard
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time CommunicationsAlexei Skachykhin
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdfJean-Frederic Clere
 
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIsHTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIsRoan Brasil Monteiro
 
Tornado Web Server Internals
Tornado Web Server InternalsTornado Web Server Internals
Tornado Web Server InternalsPraveen Gollakota
 
Covert timing channels using HTTP cache headers
Covert timing channels using HTTP cache headersCovert timing channels using HTTP cache headers
Covert timing channels using HTTP cache headersyalegko
 
ITB2019 NGINX Overview and Technical Aspects - Kevin Jones
ITB2019 NGINX Overview and Technical Aspects - Kevin JonesITB2019 NGINX Overview and Technical Aspects - Kevin Jones
ITB2019 NGINX Overview and Technical Aspects - Kevin JonesOrtus Solutions, Corp
 

Similar a Go 1.8 'new' networking features (20)

Socket programming, and openresty
Socket programming, and openrestySocket programming, and openresty
Socket programming, and openresty
 
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
 
202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
 
Juglouvain http revisited
Juglouvain http revisitedJuglouvain http revisited
Juglouvain http revisited
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
Web sockets in Java
Web sockets in JavaWeb sockets in Java
Web sockets in Java
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time Communications
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIsHTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
 
HTTP
HTTPHTTP
HTTP
 
Tornado Web Server Internals
Tornado Web Server InternalsTornado Web Server Internals
Tornado Web Server Internals
 
Covert timing channels using HTTP cache headers
Covert timing channels using HTTP cache headersCovert timing channels using HTTP cache headers
Covert timing channels using HTTP cache headers
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
ITB2019 NGINX Overview and Technical Aspects - Kevin Jones
ITB2019 NGINX Overview and Technical Aspects - Kevin JonesITB2019 NGINX Overview and Technical Aspects - Kevin Jones
ITB2019 NGINX Overview and Technical Aspects - Kevin Jones
 

Más de strikr .

Monitoring
MonitoringMonitoring
Monitoringstrikr .
 
OpenStack for Telco Cloud
OpenStack for Telco CloudOpenStack for Telco Cloud
OpenStack for Telco Cloudstrikr .
 
Oracle to PostgreSQL migration
Oracle to PostgreSQL migrationOracle to PostgreSQL migration
Oracle to PostgreSQL migrationstrikr .
 
Making Automation Work
Making Automation WorkMaking Automation Work
Making Automation Workstrikr .
 
Taking the Containers First Approach
Taking the Containers First ApproachTaking the Containers First Approach
Taking the Containers First Approachstrikr .
 
Docker enterprise Technologies
Docker enterprise TechnologiesDocker enterprise Technologies
Docker enterprise Technologiesstrikr .
 
Data Center to Cloud
Data Center to CloudData Center to Cloud
Data Center to Cloudstrikr .
 
containerD
containerDcontainerD
containerDstrikr .
 
from Docker to Moby and back. what changed ?
from Docker to Moby and back. what changed ?from Docker to Moby and back. what changed ?
from Docker to Moby and back. what changed ?strikr .
 
OCI Image Spec
OCI Image SpecOCI Image Spec
OCI Image Specstrikr .
 
OCI Runtime Spec
OCI Runtime SpecOCI Runtime Spec
OCI Runtime Specstrikr .
 
Container Orchestration
Container OrchestrationContainer Orchestration
Container Orchestrationstrikr .
 
cgo and Go plugins
cgo and Go pluginscgo and Go plugins
cgo and Go pluginsstrikr .
 
Referee project
Referee projectReferee project
Referee projectstrikr .
 
Immutable Infrastructure
Immutable InfrastructureImmutable Infrastructure
Immutable Infrastructurestrikr .
 

Más de strikr . (16)

Monitoring
MonitoringMonitoring
Monitoring
 
OpenStack for Telco Cloud
OpenStack for Telco CloudOpenStack for Telco Cloud
OpenStack for Telco Cloud
 
Oracle to PostgreSQL migration
Oracle to PostgreSQL migrationOracle to PostgreSQL migration
Oracle to PostgreSQL migration
 
DBOps
DBOpsDBOps
DBOps
 
Making Automation Work
Making Automation WorkMaking Automation Work
Making Automation Work
 
Taking the Containers First Approach
Taking the Containers First ApproachTaking the Containers First Approach
Taking the Containers First Approach
 
Docker enterprise Technologies
Docker enterprise TechnologiesDocker enterprise Technologies
Docker enterprise Technologies
 
Data Center to Cloud
Data Center to CloudData Center to Cloud
Data Center to Cloud
 
containerD
containerDcontainerD
containerD
 
from Docker to Moby and back. what changed ?
from Docker to Moby and back. what changed ?from Docker to Moby and back. what changed ?
from Docker to Moby and back. what changed ?
 
OCI Image Spec
OCI Image SpecOCI Image Spec
OCI Image Spec
 
OCI Runtime Spec
OCI Runtime SpecOCI Runtime Spec
OCI Runtime Spec
 
Container Orchestration
Container OrchestrationContainer Orchestration
Container Orchestration
 
cgo and Go plugins
cgo and Go pluginscgo and Go plugins
cgo and Go plugins
 
Referee project
Referee projectReferee project
Referee project
 
Immutable Infrastructure
Immutable InfrastructureImmutable Infrastructure
Immutable Infrastructure
 

Último

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Último (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Go 1.8 'new' networking features

  • 1. Go 1.8 新 联网 features सैफी खान saifi@ACM.org New Networking
  • 2. Warm up package main import "net/http" func main() { _, err := http.Get(`https://graph.facebook.com//v2.4/oauth/access_token`) if err != nil { panic(err.Error()) } } (22 hrs ago) https://github.com/golang/go/issues/19103
  • 3. Warm up package main import "net/http" func main() { _, err := http.Get(`https://graph.facebook.com//v2.4/oauth/access_token`) if err != nil { panic(err.Error()) } } (22 hrs ago) https://github.com/golang/go/issues/19103 x/net/http2: requests with absolute URIs in URL.Opaque produce incorrect :path header #16847 (2016-08-16)
  • 4.
  • 9.
  • 13. One TCP connection. Request → Stream Streams are multiplexed Streams are prioritized Binary Framing Layer Prioritization Flow Control Server Push Header Compression
  • 15. What does all this mean for Go ? ● You got to make “changes” in the library. ● Lots of “small” changes – Tools – Libraries – ● “Context” is critical.
  • 16. Context ● A Context carries – a deadline – a cancelation signal – and other values across API boundaries. ● Context's methods may be called by multiple goroutines simultaneously.
  • 17. Fix ● The fix tool has a new “context” fix to change imports from “golang.org/x/net/context” to “context”.
  • 18. Pprof ● The pprof tool can now profile TLS servers and skip certificate validation by using the “https+insecure” URL scheme.
  • 19. Vet ● Vet now checks for copying an array of locks, duplicate JSON and XML struct field tags, non- space-separated struct tags, deferred calls to HTTP Response.Body.Close before checking errors, and indexed arguments in Printf.
  • 20. HTTP Server Graceful Shutdown ● The HTTP Server now has support for – graceful shutdown using the new Server.Shutdown method – abrupt shutdown using the new Server.Close method.
  • 21. HTTP/2 Push ● The net/http package now includes a mechanism to send HTTP/2 server pushes from a Handler. ● Similar to the existing Flusher and Hijacker interfaces, an HTTP/2 ResponseWriter now implements the new Pusher interface.
  • 22. Context is gonna be HUGE ● new Server.Shutdown takes a context argument. ● significant additions to the database/sql package with context support. ● All nine of the new Lookup methods on the new net.Resolver now take a context. ●
  • 23. crypto/tls ● Conn.CloseWrite allows TLS connections to be half closed ● Config.Clone clones a TLS configuration. ● Config.GetClientCertificate callback allows selecting a client certificate based on the server's TLS CertificateRequest message, represented by the new CertificateRequestInfo ● Config.KeyLogWriter allows debugging TLS connections in WireShark ● … more
  • 24. crypto/x509 ● PSS signatures are now supported. ● UnknownAuthorityError now has a Cert field, reporting the untrusted certificate. ● Certificate validation is more permissive in a few cases and stricter in a few other cases. ● Root certificates will now also be looked for at /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem on Linux, to support RHEL and CentOS.
  • 25. expvar ● Package expvar provides a standardized interface to public variables ● operation counters in servers. ● exposed via HTTP at /debug/vars in JSON format. ● new Handler function returns the package's HTTP handler, to enable installing it in non- standard locations. func Handler() http.Handler
  • 26. net ● The new Buffers type permits writing to the network more efficiently from multiple discontiguous buffers in memory ● cf. writev ● Scatter – gather https://linux.die.net/man/2/writev ●
  • 27. net/http/httptrace ● support for tracing a client request's TLS handshakes – ClientTrace.TLSHandshakeStart – ClientTrace.TLSHandshakeDone
  • 28. net/http ● graceful shutdown support ● Server adds configuration options – ReadHeaderTimeout – IdleTimeout – and documents WriteTimeout ● FileServer and ServeContent now support HTTP If-Match conditional requests (RFC 7232)
  • 29. net/http … server .. Handler ● Context returned by Request.Context is canceled if the underlying net.Conn closes. For instance, if the user closes their browser in the middle of a slow request ● Handler can now detect that the user is gone. This complements the existing CloseNotifier support. ● Handler can now abort a response by panicking with the error ErrAbortHandler.
  • 30. net/http … server .. Handler ● To serve trailers produced after the header has already been written, see the new TrailerPrefix mechanism. ● Write of zero bytes to a ResponseWriter is now defined as a way to test whether a ResponseWriter has been hijacked ● If so, the Write returns ErrHijacked without printing an error to the server's error log.
  • 31. net/http … Client ● Client now copies most request headers on redirect. ● Client now supports 301, 307, and 308 redirects. ● Client.Post now follows 301 redirects, converting them to GET requests without bodies ● If the redirect requires resending the request body, the request must have the new Request.GetBody field defined. ● NewRequest sets Request.GetBody automatically for common body types.
  • 32. net/http … Transport ● Transport now supports international domain names. ● Get and other helpers. ● Transport now rejects requests for URLs with ports containing non-digit characters. ● DefaultTransport.Dialer now enables DualStack ● Transport no longer reads a byte of a non-nil Request.Body when the Request.ContentLength is zero to determine whether the ContentLength is actually zero or just undefined.
  • 33. empty interface ● interface {} may hold values of ANY type
  • 34. References {URL} ● Go 1.8 release notes https://tip.golang.org/doc/go1.8 ● HTTP/2 spec http://http2.github.io/http2-spec/index.html ● RSA PSS (Probabilistic Signature Scheme) https://www.emc.com/emc-plus/rsa-labs/historical/ra ●
  • 35. Legal { Attribution(s) } ● The usage of images is purely educational. The copyright for the images resides with their respective authros. ● Released under Creative Commons 4.0 Non- Commercial Share-Alike