Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Cơ Sở Dữ Liệu

Cách kết nối ObjectRocket: Các bước đơn giản cho Secure Database Access

Có vài cách dễ dàng connect và interact với ObjectRocket database service.

Bước đầu: tạo instance dùng button "Create Instance". Khi tạo instance, connect strings provisioned automatically. Bạn có choice của vài connection methods:

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

Trước khi vào how to connect, overview cần thiết. ObjectRocket service inherently và automatically sharded system. Nghĩa là khi connect, instantly connected to at least one shard (tùy layout). Instance cũng có at least 3 members trong replica set. Upon connection, automatically routed to current master cho shard đó. No configuration needed trong drivers hoặc system, all seamless.

ObjectRocket service không 'open' by default. Chúng tôi view security as very important attribute trong proper enterprise grade system. Vì vậy, để connect, phải ensure client added to own ACL list for access. Done via GUI trên database/Connections tab. Adding ACL entry cho phép open firewall cho mình, cung cấp comment keep organized. Có thể add any CIDR compliant address. Cho phép open range addresses. Ví dụ: open all EC2 webservers one shot.

ObjectRocket strategically located gần popular datacenters across US. Unique network peering arrangement cho phép ObjectRocket accessed từ any application very quickly. Many cases customers won't notice latency penalty dùng ObjectRocket vs local cloud provider.

Native Connections

Native connections ObjectRocket fairly simple. Chỉ dùng connect string như bình thường via any MongoDB driver;

$ mongo w-mongos0.objectrocket.com:4343

Unique là host và port này fully load balanced và fully redundant. Application không cần specify many host addresses hoặc complicated configuration. Host name specified gets routed to one of N MongoS servers. Chỉ dùng connect string provided trong application config và all set. Có thể shard at will và never any configuration changes required.

SSL

SSL connections hơi khác. Connection là standard SSL connection directly terminated on ObjectRocket POD. Cần client compiled with SSL nếu dùng shell, hoặc many drivers now have SSL support. Nếu chưa running SSL compiled client, contact us send one incorporate vào source. Alternatively, stunnel works seamlessly với ObjectRocket service, cho phép continue dùng non-SSL enabled MongoDB client without modifying existing software stack. Connection vẫn load balanced, redundant, no changes as shards added.