-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnginx.conf
More file actions
26 lines (23 loc) · 953 Bytes
/
nginx.conf
File metadata and controls
26 lines (23 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
events {
# determines how many requests can simultaneously be served
# https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration
# for more information
worker_connections 2048;
}
http {
server {
# configures the server to listen to the port 8080
# Amazon SageMaker sends inference requests to port 8080.
# For more information: https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-code-container-response
listen 8080 deferred;
# redirects requests from SageMaker to TF Serving
location /invocations {
proxy_pass http://localhost:8501/v1/models/deepctr_model:predict;
}
# Used by SageMaker to confirm if server is alive.
# https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-algo-ping-requests
location /ping {
return 200 "OK";
}
}
}