Skip to content

Commit

Permalink
set idle timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoyu authored and seldondev committed Jul 20, 2020
1 parent 9d3bbfc commit f2575c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions executor/api/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/seldonio/seldon-core/executor/predictor"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"time"
)

type SeldonRestApi struct {
Expand Down Expand Up @@ -67,8 +68,9 @@ func (r *SeldonRestApi) CreateHttpServer(port int) *http.Server {
// will apply no timeout at all. Instead, we control that through the
// http.Client instance making requests to the underlying node graph servers.
return &http.Server{
Handler: r.Router,
Addr: address,
Handler: r.Router,
Addr: address,
IdleTimeout: 65 * time.Second,
}
}

Expand Down
1 change: 1 addition & 0 deletions operator/controllers/seldondeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func createIstioResources(mlDep *machinelearningv1.SeldonDeployment,
},
},
},
TrafficPolicy: &istio_networking.TrafficPolicy{ConnectionPool: &istio_networking.ConnectionPoolSettings{Http: &istio_networking.ConnectionPoolSettings_HTTPSettings{IdleTimeout: &types2.Duration{Seconds: 60}}}},
},
}

Expand Down

0 comments on commit f2575c9

Please sign in to comment.