Skip to content
This repository has been archived by the owner on Aug 17, 2018. It is now read-only.

Allow support for a LimitListener #51

Open
1 of 3 tasks
theodesp opened this issue Jul 20, 2017 · 5 comments
Open
1 of 3 tasks

Allow support for a LimitListener #51

theodesp opened this issue Jul 20, 2017 · 5 comments

Comments

@theodesp
Copy link
Collaborator

Note: for support questions, please use our gitter channel or stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • **I'm submitting a ... **

    • bug report
    • feature request
    • support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?
    Feature

  • What is the current behavior?
    No limit of the server listener connections

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  • What is the expected behavior?
    I Propose to add a limit listener that will restrict the amount of active connections in the server

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • Library version: v7.3.4

  • Operating System: [Darwin Kernel Version 10.2.0 | Microsoft Windows [Version 10.0.10240]]

  • System Information: [Core i7-7740X 16gb Ram]

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
    I've taken the inspiration from
    https://github.com/tylerb/graceful/blob/master/limit_listen.go

wher you can wrap the net.Listener struct to accept a limit so we have a bounded number of active connections per server.

@Dexus
Copy link
Contributor

Dexus commented Jul 20, 2017

Are you able to implement it with test and coverage?

@theodesp
Copy link
Collaborator Author

I will work on this weekend

@theodesp
Copy link
Collaborator Author

I would like to also enhance the ticket scope by providing options for:

  1. Limiting the Server connections in a global way
  2. Limiting the Server connections from a particular client.ip, request.host or request.header.X-Header
  3. Expose options from a config file
  4. On connection limit, we should respond with https://httpstatuses.com/429
  5. Middleware support.

@Dexus
Copy link
Contributor

Dexus commented Jul 21, 2017

I like it. I'm looking forward to testing it.

@Dexus
Copy link
Contributor

Dexus commented Sep 6, 2017

@theodesp any update?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants