shutdown/

directory
Version: v0.0.0-...-86d22a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2017 License: Apache-2.0

README

Web - Shutdown

Learn how to gracefully shut a server down.

Notes

Since 1.8 the Server from net/http package has built in support for graceful shutdown. Prior to 1.8 use github.com/braintree/manners.

https://golang.org/pkg/net/http/
https://github.com/rakyll/hey

Code Review

Graceful Shutdown

Exercises

Exercise 1

Use hey to generate load against the server in example 1. Close the server with ctrl-c while hey is running. Change the timeout value in the shutdown code to 100 milliseconds and repeat the exercise.


All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
This program shows how to launch a web server then shut it down gracefully.
This program shows how to launch a web server then shut it down gracefully.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL