Answer the question
In order to leave comments, you need to log in
How to proxy requests to mongodb+srv in nginx?
Tell me how to configure request proxying in nginx to MongoDB Altas, which is connected via mongodb+ srv://cluster1.abcde.mongodb.net/
stream {
server {
listen 50002 so_keepalive=on;
proxy_connect_timeout 2s;
proxy_pass stream_mongo_backend;
proxy_timeout 10m;
}
upstream stream_mongo_backend {
server cluster1.abcde.mongodb.net:27017;
}
}
Answer the question
In order to leave comments, you need to log in
Ask Altas support. I'm not sure if we can correctly proxy, because if we specify three servers, the application will not know which of them is the master.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question