Hacker News new | past | comments | ask | show | jobs | submit login
Securing MongoDB Behind Nginx (attachmentsme.tumblr.com)
11 points by BenjaminCoe on Jan 8, 2011 | hide | past | favorite | 4 comments



couldn't this be done easier with just a ssh tunnel?


An 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.


One 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


Anyone know what his full stack is?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: