« Back to Blog

Connecting to ObjectRocket

By enorman@objectrocket.com

Posted on: October 3, 2012

There are a few easy ways to connect and interact with the ObjectRocket database service.

The first step is to create an instance using the “Create Instance” button. When you create an instance, your connect strings are provisioned for you automatically. You have the choice of any of a few different connection methods:

  1. Native MongoDB driver, plain text
  2. Native MongoDB driver, SSL encrypted
  3. ObjectRocket API, SSL Encrypted

Before we get into how to connect, some overview is in order. The ObjectRocket service is an inherently and automatically sharded system. That means when you connect, you are instantly connected to at least one shard (depending on your layout). The instance will also have at least 3 members in the replica set. Upon connection you automatically get routed to the current master for that shard. There is no configuration needed in your drivers or with our system, it’s all seamless.

The ObjectRocket service is not ‘open’ by default. We view security as a very important attribute in any proper enterprise grade system. Thus, in order to connect, you must ensure your client has been added to your own ACL list for access. This is done via the GUI on the database/Connections tab. Adding an ACL entry allows you to open the firewall for yourself, and provide a comment to help keep things orgainized. You can add any CIDR compliant address. This allows for opening a range of addresses. For instance, open all your EC2 webservers in one shot.

ObjectRocket is strategically located close to popular datacenters across the US. Our unique network peering arangement allows for ObjectRocket to be accessed from any application very quickly. In many cases customers won’t notice any latency penalty with using ObjectRocket vs using the local cloud provider.

Native Connections

Native connections to ObjectRocket are fairly simple. Just use a connect string as you normally would via any MongoDB driver;

$ mongo w-mongos0.objectrocket.com:4343

What is a bit unique is this host and port is fully load balanced and fully redundant. An application doesn’t need to specify many host addresses or have a complicated configuration. The host name specified gets routed to one of N MongoS servers. Simply use the connect string provided in your applications configuration and you are all set. You can shard at will and there are never any configuration changes required.


SSL connections are a bit different. The connection is a standard SSL connection directly terminated on the ObjectRocket POD. You will need a client compiled with SSL if you are using the shell, or many drivers now have SSL support. If you aren’t already running an SSL compiled client, contact us and we can send you one to incorporate into your source. Alternatively, stunnel works seamlessly with the ObjectRocket service, and will allow you to continue to use a non-SSL enabled MongoDB client without modifying your existing software stack. The connection is still load balanced, redundant, and requires no changes as shards are added.

eBook: Everything you need to know about DBaaS

Learn why DBaaS is booming and get a checklist of questions to ask vendors to find the right fit for your business.

Learn More →

DBaaS for Elasticsearch JetpackeBook: DBaaS for Elasticsearch JetpackEverything you need to know about Elasticsearch with Kibana. Plus, learn how DBaaS can save you time and money.Learn More →

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.