Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Pause server #448

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Pause server #448

wants to merge 5 commits into from

Commits on Oct 19, 2016

  1. API for connection limits of Server

    Add a `pause`/`resume` API to `Server` which removes/adds a server's
    listening sockets on its event loop selector.  This facility allows DoS
    prevention from SYN flooding connection herds.
    
    Add `max_connections` kwarg to `loop.create_server` and `Server` which
    controls pause/resume behavior when not `None`.
    
    Notes:
    
      1. Using Server.pause/resume and create_server(max_connections) are
         mutually exclusive.
      2. The listen backlog and accept semantics are not taken into consideration.
         As a result the actual number of connections established will vary
         and should be considered platform and/or event loop dependant.
    mayfield committed Oct 19, 2016
    Configuration menu
    Copy the full SHA
    3a6a2bb View commit details
    Browse the repository at this point in the history
  2. Add max_connections to create_unix_server.

    Fix Server create for unix sockets and add support for max_connections.
    mayfield committed Oct 19, 2016
    Configuration menu
    Copy the full SHA
    526b74d View commit details
    Browse the repository at this point in the history
  3. Add tests for Server pause behavior.

    Tests for create_server(max_connections=number) and Server.pause/resume.
    mayfield committed Oct 19, 2016
    Configuration menu
    Copy the full SHA
    56d0d0b View commit details
    Browse the repository at this point in the history
  4. Add Server pause tests for unix servers.

    Refactored a bit to share most the logic with the TCP server.
    mayfield committed Oct 19, 2016
    Configuration menu
    Copy the full SHA
    f157ec7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1a38d87 View commit details
    Browse the repository at this point in the history