Skip to content

Commit

Permalink
Merge pull request #16 from fasaxc/remove-reject
Browse files Browse the repository at this point in the history
Back out rejection of incoming connections.
  • Loading branch information
fasaxc authored Jun 10, 2017
2 parents 1a4f7ab + e09ccfd commit 371204c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions pkg/syncserver/sync_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ var (
Name: "typha_connections_accepted",
Help: "Total number of connections accepted over time.",
})
counterNumConnectionsRejected = prometheus.NewCounter(prometheus.CounterOpts{
Name: "typha_connections_rejected",
Help: "Total number of connections rejected due to throttling.",
})
counterNumConnectionsDropped = prometheus.NewCounter(prometheus.CounterOpts{
Name: "typha_connections_dropped",
Help: "Total number of connections dropped due to rebalancing.",
Expand Down Expand Up @@ -87,7 +83,6 @@ var (

func init() {
prometheus.MustRegister(counterNumConnectionsAccepted)
prometheus.MustRegister(counterNumConnectionsRejected)
prometheus.MustRegister(counterNumConnectionsDropped)
prometheus.MustRegister(gaugeNumConnections)
prometheus.MustRegister(summarySnapshotSendTime)
Expand Down Expand Up @@ -220,14 +215,6 @@ func (s *Server) serve(cxt context.Context) {
logCxt.WithError(err).Panic("Failed to accept connection")
}

if s.atConnLimit() {
logCxt.WithField("conn", conn.RemoteAddr()).Warn(
"Too many active connections, dropping incoming connection.")
counterNumConnectionsRejected.Inc()
conn.Close()
continue
}

connID := s.nextConnID
s.nextConnID++
logCxt.WithField("connID", connID).Info("New connection")
Expand Down

0 comments on commit 371204c

Please sign in to comment.