5 ms·
Securing MongoDB Behind Nginx
- chopsueyar 16y agoAnyone know what his full stack is?
- catch23 16y agocouldn't this be done easier with just a ssh tunnel?
- BenjaminCoe 16y agoAn SSH tunnel might be what we ultimately end up using. The HTTP service layer was meant to be a bit of an abstraction as well, in case we ultimately ended up going with another key/value store, e.g., HBase or Casandra -- having said that, MongoDB is working pretty awesomely so far.
- BenjaminCoe 16y agoOne other thing I should have noted is that, because of Mongate's batch functionality, depending on the type of data you are inserting, you can actually get better performance from it vs. an SSH tunnel. Here are some tests I ran, benchmarking a batch of 50 insertions/updates on an SSH tunnel ( ssh -C -o CompressionLevel=9 -N -f -L 27017:localhost:27017 -C root@mongo_host ) vs. Mongate. 50 Insert/Update Operations Pymongo over SSH Tunnel: (5.5 + 5.8 + 5.9 + 2.0 + 5.8 + 5.7 + 5.7 + 5.8 + 6.1 + 5.9) / 10.0 = 5.42s Mongate over HTTPS: (3.7 + 3.7 + 3.6 + 3.7 + 3.7 + 3.9 + 3.7 + 3.8 + 4.7 + 3.8) / 10.0 = 3.83s