Skip to content
This repository has been archived by the owner. It is now read-only.

Pause server #448

Open
wants to merge 5 commits into
base: master
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
  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
  3. Add tests for Server pause behavior.

    Tests for create_server(max_connections=number) and Server.pause/resume.
    mayfield committed Oct 19, 2016
  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
  5. Skip Server pause tests with Proactor event loop

    mayfield committed Oct 19, 2016
You can’t perform that action at this time.