Added version 4.2.

Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
This commit is contained in:
2023-07-11 13:21:20 +00:00
committed by zuul
parent 4c6bc53817
commit ba65944bfd
304 changed files with 8088 additions and 3733 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dds_01_0002.html">Cluster</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0005.html">Database Parameter Group</a></strong><br>
<li class="ulchildlink"><strong><a href="dds_01_0005.html">Database Parameter Template</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0027.html">Regions and AZs</a></strong><br>
</li>

View File

@ -1,16 +1,16 @@
<a name="dds_01_0002"></a><a name="dds_01_0002"></a>
<h1 class="topictitle1">Cluster</h1>
<div id="body1529654902838"><p id="dds_01_0002__p03931746111514">DDS cluster instances consist of mongos, config, and shard nodes. The following diagram shows the node relationships.</p>
<div class="fignone" id="dds_01_0002__fig20857165904711"><span class="figcap"><b>Figure 1 </b>Diagram of node relationships</span><br><span><img id="dds_01_0002__image48576592473" src="en-us_image_0284275219.png"></span></div>
<div id="body1529654902838"><p id="dds_01_0002__p03931746111514">Each DDS cluster consists of a config node, and multiple mongos and shard nodes. The following diagram shows the node relationships.</p>
<div class="fignone" id="dds_01_0002__fig20857165904711"><span class="figcap"><b>Figure 1 </b>Diagram of node relationships</span><br><span><img id="dds_01_0002__image48576592473" src="en-us_image_0000001096133880.png"></span></div>
<div class="section" id="dds_01_0002__section2471635113117"><h4 class="sectiontitle">mongos</h4><p id="dds_01_0002__p5397278143035">A mongos is a router for reading and writing data, providing a unified interface for accessing DB instances.</p>
<ul id="dds_01_0002__ul7747113611462"><li id="dds_01_0002__li1074719364468">Each DB instance has 2 to 16 mongos. You can specify the quantity.</li><li id="dds_01_0002__li474733612462">A mongos reads configuration settings from configs and allocates read and write requests to shards. You can connect to a mongos directly.</li></ul>
<ul id="dds_01_0002__ul7747113611462"><li id="dds_01_0002__li1782033319534">Each DB instance has 2 to 32 mongos. You can specify the quantity.</li><li id="dds_01_0002__li474733612462">A mongos reads configuration settings from configs and allocates read and write requests to shards. You can connect to a mongos directly.</li></ul>
</div>
<div class="section" id="dds_01_0002__section109912514314"><h4 class="sectiontitle">config</h4><p id="dds_01_0002__p49633946153220">A config stores configuration settings for DB instances and consists of one replica set.</p>
<ul id="dds_01_0002__ul17872294911"><li id="dds_01_0002__li158713234917">The availability of a config is the prerequisite to deploying a DB instance or modifying the instance information.</li><li id="dds_01_0002__li787112154919">You cannot connect to a config directly.</li></ul>
</div>
<div class="section" id="dds_01_0002__section16795142043220"><h4 class="sectiontitle">shard</h4><p id="dds_01_0002__p32858642161053">In the cluster instance, shards are used to store user data.</p>
<ul id="dds_01_0002__ul165293820493"><li id="dds_01_0002__li252912854914">Each DB instance has 2 to 16 shards. You can specify the quantity.</li><li id="dds_01_0002__li55295884911">Each shard is deployed as a replica set to ensure data redundancy and high reliability.</li><li id="dds_01_0002__li155291189493">You cannot connect to a shard directly.</li></ul>
<ul id="dds_01_0002__ul165293820493"><li id="dds_01_0002__li9973142115417">Each cluster instance has 2 to 32 shards. You can specify the quantity.</li><li id="dds_01_0002__li55295884911">Each shard is deployed as a replica set to ensure data redundancy and high reliability.</li><li id="dds_01_0002__li155291189493">You cannot connect to a shard directly.</li></ul>
</div>
</div>
<div>

View File

@ -1,7 +1,7 @@
<a name="dds_01_0005"></a><a name="dds_01_0005"></a>
<h1 class="topictitle1">Database Parameter Group</h1>
<div id="body63334794"><p id="dds_01_0005__p25613828112035">A database parameter group is a collection of configuration parameters and values and can be applied to multiple DB instances.</p>
<h1 class="topictitle1">Database Parameter Template</h1>
<div id="body63334794"><p id="dds_01_0005__p25613828112035">A database parameter template is a collection of configuration parameters and values and can be applied to multiple DB instances.</p>
</div>
<div>
<div class="familylinks">

View File

@ -1,19 +1,74 @@
<a name="dds_01_0006"></a><a name="dds_01_0006"></a>
<h1 class="topictitle1">Product Advantages</h1>
<div id="body1522807549935"></div>
<h1 class="topictitle1">Functions and Features</h1>
<div id="body1522807549935"><div class="section" id="dds_01_0006__section735914516588"><h4 class="sectiontitle">Three Architectures</h4><p id="dds_01_0006__p32189385914">DDS supports three deployment architectures: cluster, replica set, and single node. They meet requirements of different service scenarios.</p>
<ul id="dds_01_0006__ul122452013116"><li id="dds_01_0006__li2245400115">Cluster<p id="dds_01_0006__p105491324012"><a name="dds_01_0006__li2245400115"></a><a name="li2245400115"></a>A cluster consists of three types of nodes: mongos, shard, and config. You can select the number and configuration of mongos and shard nodes to create cluster instances with different levels of service performance.</p>
</li></ul>
<ul id="dds_01_0006__ul181191932112"><li id="dds_01_0006__li81201439119">Replica set<p id="dds_01_0006__p134215451306"><a name="dds_01_0006__li81201439119"></a><a name="li81201439119"></a>DDS automatically builds the replica set architecture, and you can directly operate the primary and secondary nodes. DDS provides you with advanced functions such as high availability (HA) and disaster recovery (DR) switchover, and is invisible to applications.</p>
</li></ul>
<ul id="dds_01_0006__ul225212511116"><li id="dds_01_0006__li625235312">Single node<p id="dds_01_0006__p11554145612014"><a name="dds_01_0006__li625235312"></a><a name="li625235312"></a>A database that is deployed on a single VM does not have the HA feature. To ensure data consistency during full backup, tables are locked to prevent data from being changed. The single-node architecture features low costs and is a preferred option for R&amp;D and testing environment, learning and training environment, and internal systems of small-sized enterprises.</p>
</li></ul>
</div>
<div class="section" id="dds_01_0006__section43893088141312"><h4 class="sectiontitle">Elastic Scaling</h4><p id="dds_01_0006__p6512111309">With the development of your services, you can change CPU and memory specifications of instances, expand storage space, and add mongos and shard nodes of cluster DB instances in real time. You are advised to perform the change during off-peak hours to avoid the impact of changes on your services.</p>
</div>
<div class="section" id="dds_01_0006__section1193519218375"><h4 class="sectiontitle">Key Features</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_01_0006__table635792473717" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Key feature description</caption><thead align="left"><tr id="dds_01_0006__row19470192463717"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.3.2.2.3.1.1"><p id="dds_01_0006__p164701624173719">Features</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="77%" id="mcps1.3.3.2.2.3.1.2"><p id="dds_01_0006__p8470142463710">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_01_0006__row1847052415377"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p247042416372">SLA</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p147022415379">99.95%</p>
</td>
</tr>
<tr id="dds_01_0006__row9471202463714"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p15471824143715">Instant availability</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p1713415416215">You can create a DB instance on the management console and access DDS through an Elastic Cloud Server (ECS) to reduce the application response time. If you need to access a DB instance from your local devices, you can bind an elastic IP address (EIP) to the instance.</p>
</td>
</tr>
<tr id="dds_01_0006__row16471162443718"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p17471124143716">High compatibility</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p9544512136">DDS is a document-oriented <span class="keyword" id="dds_01_0006__keyword8901516133710">NoSQL database</span>. It is fully compatible with <span class="keyword" id="dds_01_0006__keyword015433210372">MongoDB</span>.</p>
</td>
</tr>
<tr id="dds_01_0006__row13471324143719"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p124711024123719">Visualized operation and maintenance (O&amp;M)</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p1147192433715">You can easily perform restart, backup, and data recovery operations on instances using a graphical user interface (GUI)</p>
</td>
</tr>
<tr id="dds_01_0006__row74712245377"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p1547102463713">Data security</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><ul id="dds_01_0006__ul7453191717718"><li id="dds_01_0006__li184541317172">A security protection system consists of VPCs, subnets, security groups, storage encryption, SSL, and DDoS protection, which is capable of defending against various malicious attacks and ensuring data security.</li><li id="dds_01_0006__li144546171973">DDS supports fine-grained permission control.</li></ul>
</td>
</tr>
<tr id="dds_01_0006__row34711242379"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p164713241378">High availability</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p2471824183714">The cluster and replica set support high availability. If the primary node is faulty, the secondary node takes over services in a short time. The switchover process is invisible to applications.</p>
</td>
</tr>
<tr id="dds_01_0006__row1047118244374"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p44718240373">Metric monitoring</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p1747142414373">DDS monitors key performance metrics of DB instances and DB engines in real time, including the CPU usage, memory usage, storage space usage, command execution frequency, delete statement execution frequency, insert statement execution frequency, and number of active connections.</p>
</td>
</tr>
<tr id="dds_01_0006__row10471624153710"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p134721224203719">Backups and restorations</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><ul id="dds_01_0006__ul109821022153520"><li id="dds_01_0006__li1282705914720">DDS supports automated backup and manual backup. The maximum retention period of an automated backup is 732 days. There is no limit on the manual backup retention period. You can delete manual backup files as needed.</li><li id="dds_01_0006__li798214220351">DB instances can be restored using backup data. </li></ul>
</td>
</tr>
<tr id="dds_01_0006__row19472182483712"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.2.2.3.1.1 "><p id="dds_01_0006__p18472124143715">Setting parameters</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.3.2.2.3.1.2 "><p id="dds_01_0006__p10472424193715">DDS allows you to manage parameter Templates and modify configuration parameters on the console.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dds_01_0007.html">High Reliability</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0008.html">High Security</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0010.html">Ease of Use</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0009.html">Scalability</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_user_guide.html">Introduction</a></div>
</div>

View File

@ -1,20 +0,0 @@
<a name="dds_01_0007"></a><a name="dds_01_0007"></a>
<h1 class="topictitle1">High Reliability</h1>
<div id="body1523157563922"><div class="section" id="dds_01_0007__section56101305112535"><h4 class="sectiontitle">Failover</h4><p id="dds_01_0007__p38650255112545">The three-node replica set architecture of DDS ensures high service availability.</p>
<p id="dds_01_0007__p12307983112545">In a replica set, both the primary and secondary nodes provide services. If a primary node goes down or becomes faulty, a secondary node is automatically assigned to the primary role and continues normal operation. If a secondary node is unavailable, a hidden node will take the role of the secondary to ensure high availability.</p>
</div>
<div class="section" id="dds_01_0007__section18363126194820"><h4 class="sectiontitle">Multi-Copy Redundancy</h4><p id="dds_01_0007__p359664514713">config and shard use the three-node replica set HA architecture. Using this architecture, nodes are deployed on different servers and racks.</p>
</div>
<div class="section" id="dds_01_0007__section144894164812"><h4 class="sectiontitle">Data Backups</h4><p id="dds_01_0007__p1427511361493">Data can be backed up automatically or manually. Automated backups execute full backups on DB instances. A manual backup is a full backup of DB instances initiated by users. These backups can be used to restore DB instances with a few clicks.</p>
<p id="dds_01_0007__p65964452473">Backups are stored in Object Storage Service (OBS), improving the data disaster recovery capabilities while reducing the needed storage space. When a DB instance is created, the automated backup policy is enabled by default. After the DB instance is created, an automated full backup is triggered instantly. The backup retention period is 7 days by default. You can set the backup retention period and modify the backup policy. In addition, you can initiate backup at any time according to your service requirements. Manual backups are saved until you manually delete them.</p>
</div>
<div class="section" id="dds_01_0007__section986045820483"><h4 class="sectiontitle">Data Restore</h4><p id="dds_01_0007__p1802338811358">You can use backup data to restore instance data. Restored data is the same as the original data.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_01_0006.html">Product Advantages</a></div>
</div>
</div>

View File

@ -1,22 +0,0 @@
<a name="dds_01_0008"></a><a name="dds_01_0008"></a>
<h1 class="topictitle1">High Security</h1>
<div id="body1523157563922"><div class="section" id="dds_01_0008__section157471650114110"><h4 class="sectiontitle">Network Isolation</h4><p id="dds_01_0008__p3308128144112">DDS uses Virtual Private Clouds (VPCs) and network security groups to isolate your DB instances. VPCs allow you to configure IP address ranges that are allowed <span class="keyword" id="dds_01_0008__keyword11226140173518">access to DDS</span>. You can run your DB instances in a VPC to improve security. To further enhance database security, you can configure subnets and security groups to control access to DB instances.</p>
</div>
<div class="section" id="dds_01_0008__section36087416422"><h4 class="sectiontitle">Access Control</h4><p id="dds_01_0008__p18308482418">VPC security groups can have rules that govern both inbound and outbound traffic of DB instances.</p>
</div>
<div class="section" id="dds_01_0008__section05340203433"><h4 class="sectiontitle">Transmission Encryption</h4><p id="dds_01_0008__p830810894115">DDS uses Secure Sockets Layer (SSL) to encrypt transmitted data. You can download a certificate authority (CA) from the DDS console and upload it for authentication when connecting to a database.</p>
</div>
<div class="section" id="dds_01_0008__section13931102311470"><h4 class="sectiontitle">Security Protection</h4><p id="dds_01_0008__p43613116165432">DDS provides a multi-layer network protection against various malicious attacks. The protection system consists of VPCs, subnets, security groups, DDoS protection, and SSL.</p>
<ul id="dds_01_0008__ul32942050165536"><li id="dds_01_0008__li58325462165536">VPC is used to isolate tenants and control access to databases.</li><li id="dds_01_0008__li18619715165536">The SSL connection ensures data security and integrity.</li><li id="dds_01_0008__li31046077165536">Security group rules restrict traffic to specific IP addresses and ports, securing connections between DDS and other services.</li></ul>
</div>
<div class="section" id="dds_01_0008__section1305495014142"><h4 class="sectiontitle">Performance Monitoring</h4><p id="dds_01_0008__p3638310511648">DDS monitors instance performance, reducing O&amp;M activities by as much as 60%. It provides real-time monitoring information about CPU utilization, disk usage, IOPS, and number of active connections, allowing you to check instance status at any time.</p>
<p id="dds_01_0008__p53627552103843">In asynchronous disk scenarios, DDS provides excellent plugin performance and process memory databases. It also provides the secondary index function to meet dynamic query requirements.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_01_0006.html">Product Advantages</a></div>
</div>
</div>

View File

@ -1,14 +0,0 @@
<a name="dds_01_0009"></a><a name="dds_01_0009"></a>
<h1 class="topictitle1">Scalability</h1>
<div id="body1523176566513"><div class="section" id="dds_01_0009__section196165812279"><h4 class="sectiontitle">Elastic Scaling</h4><p id="dds_01_0009__p9617128102711">DDS supports the cluster mode. You can select multiple mongos and shards. When your service changes or the current instance configuration cannot meet the application performance requirements, DDS allows you to scale up storage space of shards, or add new shards. During the expansion, your services will not be interrupted.</p>
</div>
<div class="section" id="dds_01_0009__section3892342014122"><h4 class="sectiontitle">On-demand Scaling</h4><p id="dds_01_0009__p4151772163758">DDS supports the three-node replica set mode. You can scale up the storage space based on your service requirements and only pay for the resources you consumed. If the storage space of the current DB instance cannot meet your application requirements, you can expand the storage capacity. During the expansion, your services will not be interrupted.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_01_0006.html">Product Advantages</a></div>
</div>
</div>

View File

@ -1,16 +0,0 @@
<a name="dds_01_0010"></a><a name="dds_01_0010"></a>
<h1 class="topictitle1">Ease of Use</h1>
<div id="body1523159625176"><div class="section" id="dds_01_0010__section61491233144328"><h4 class="sectiontitle">Instant Availability</h4><p id="dds_01_0010__p37262363619">You can create a DB instance on the management console and access DDS through an Elastic Cloud Server (ECS) to reduce the application response time. If you need to access a DB instance from your local devices, you can bind an elastic IP address (EIP) to the instance.</p>
</div>
<div class="section" id="dds_01_0010__section11590950144344"><h4 class="sectiontitle">High Compatibility</h4><p id="dds_01_0010__p49545217151751">DDS is a document-oriented <span class="keyword" id="dds_01_0010__keyword8901516133710">NoSQL database</span>. It is fully compatible with <span class="keyword" id="dds_01_0010__keyword015433210372">MongoDB</span>.</p>
</div>
<div class="section" id="dds_01_0010__section43893088141312"><h4 class="sectiontitle">Easy O&amp;M</h4><p id="dds_01_0010__p57240111647">You can easily perform restart, backup, and data recovery operations on instances using a graphical user interface (GUI)</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_01_0006.html">Product Advantages</a></div>
</div>
</div>

View File

@ -1,10 +1,10 @@
<a name="dds_01_0011"></a><a name="dds_01_0011"></a>
<h1 class="topictitle1">Cluster Architecture</h1>
<div id="body50525752"><p id="dds_01_0011__p16715644165033">Each DDS cluster is an independent document database. A sharded cluster consists of mongos, config, and shard.</p>
<p id="dds_01_0011__p4243244165318">Data read and write requests are forwarded by mongos. A mongos reads configuration settings from configs and allocates the read and write requests to shards, making it easy to cope with high concurrency scenarios. In addition, each config and shard is a replica set that provides high availability. The following figure shows the DDS cluster architecture.</p>
<div class="fignone" id="dds_01_0011__fig1930710481542"><span class="figcap"><b>Figure 1 </b>Cluster architecture</span><br><span><img id="dds_01_0011__image1530774814410" src="en-us_image_0284274967.png"></span></div>
<ul id="dds_01_0011__ul3754275165450"><li id="dds_01_0011__li18678526165450">Each mongos is a single node. To realize load balancing and automatic failover, you can provision multiple mongos. A single cluster supports 2 to 16 mongos.</li><li id="dds_01_0011__li9025895165450">Each shard is a three-node replica set. A single cluster supports 2 to 16 shards.</li><li id="dds_01_0011__li58596018165450">config is mandatory in a cluster instance. It stores instance configuration information and consists of one replica set.</li><li id="dds_01_0011__li37457807165450">mongos and shards cannot be added using native commands but can be scaled out on the DDS console.</li><li id="dds_01_0011__li5054286165450">You cannot connect to a config and shard. Data operations can only be delivered by connecting to mongos.</li><li id="dds_01_0011__li17418689165450">Currently, a three-node replica set cannot be directly upgraded to a cluster.</li></ul>
<h1 class="topictitle1">Cluster</h1>
<div id="body50525752"><p id="dds_01_0011__p16715644165033">Each DDS cluster is an independent document database. A sharded cluster consists of a config node, and multiple mongos and shard nodes.</p>
<p id="dds_01_0011__p4243244165318">Data read and write requests are forwarded by the mongos nodes, which read configuration settings from config, and then allocate the read and write requests to the shards, making it easy to cope with high concurrency scenarios. In addition, each config node, along with the shards in its cluster, is replicated in triplicate to ensure high availability. The following figure shows the DDS cluster architecture.</p>
<div class="fignone" id="dds_01_0011__fig1930710481542"><span class="figcap"><b>Figure 1 </b>Cluster architecture</span><br><span><img id="dds_01_0011__image1530774814410" src="en-us_image_0000001143133849.png"></span></div>
<ul id="dds_01_0011__ul3754275165450"><li id="dds_01_0011__li18981955141813">A driver handles all interactions between your application and the database in a language appropriate to the application. For details, see <a href="https://docs.mongodb.com/drivers/" target="_blank" rel="noopener noreferrer">official documents</a>.</li><li id="dds_01_0011__li18678526165450">Each mongos is a single node, but you can provision multiple mongos nodes for load balancing and failovers. A single cluster can contain 2 to 32 mongos nodes.</li><li id="dds_01_0011__li9025895165450">Each shard is a three-node replica set, and each cluster can contain 2 to 32 shards.</li><li id="dds_01_0011__li58596018165450">A config node is a necessary part of a cluster instance, and is also deployed as a replica set. The config node stores instance configuration data.</li><li id="dds_01_0011__li37457807165450">The number of mongos and shard nodes can be increased from the management console. You do not need to use native commands.</li><li id="dds_01_0011__li5795164065810">You can <a href="dds_02_0100.html">enable IP addresses of shards and the config node</a> to directly access the shards and the config node.</li><li id="dds_01_0011__li17418689165450">A three-node replica set cannot be directly upgraded to a cluster.</li></ul>
</div>
<div>
<div class="familylinks">

View File

@ -1,14 +1,14 @@
<a name="dds_01_0012"></a><a name="dds_01_0012"></a>
<h1 class="topictitle1">Replica Set Architecture</h1>
<div id="body1495008759160"><p id="dds_01_0012__p7418203421717">A replica set consists of a set of mongod processes and provides a collection of data nodes to ensure data redundancy and reliability.</p>
<div class="note" id="dds_01_0012__note384375010261"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_01_0012__p188447506264">For details about the mongod process, visit <a href="https://docs.mongodb.com/v3.2/tutorial/manage-mongodb-processes/index.html" target="_blank" rel="noopener noreferrer">https://docs.mongodb.com/v3.2/tutorial/manage-mongodb-processes/index.html</a>.</p>
<h1 class="topictitle1">Replica Set</h1>
<div id="body1495008759160"><p id="dds_01_0012__p7418203421717">A replica set consists of a set of mongod processes. It is a collection of nodes that help ensure data redundancy and reliability.</p>
<div class="note" id="dds_01_0012__note384375010261"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_01_0012__p188447506264">For details about the mongod process, see the MongoDB <a href="https://docs.mongodb.com/v3.2/tutorial/manage-mongodb-processes/index.html" target="_blank" rel="noopener noreferrer">official document</a>.</p>
</div></div>
<p id="dds_01_0012__p4922292317836">A replica set consists of three nodes: primary, secondary, and hidden. The three-node architecture is automatically set up, and the three nodes synchronize data with each other automatically to ensure data reliability.</p>
<ul id="dds_01_0012__ul7572160172233"><li id="dds_01_0012__li1040581172233">The primary node is used to read and write requests.</li><li id="dds_01_0012__li9365232172233">The secondary node is used to read requests.</li><li id="dds_01_0012__li17178226172233">The hidden node is used to back up data.</li></ul>
<p id="dds_01_0012__p440813339588">You can directly perform operations on the primary and secondary nodes. If a primary node goes down or becomes faulty, a secondary node is automatically assigned to the primary role and continues normal operation. If a secondary node is unavailable, a hidden node will take the role of the secondary to ensure high availability. The following figure shows the replica set architecture.</p>
<div class="fignone" id="dds_01_0012__fig4417616382"><span class="figcap"><b>Figure 1 </b>Replica set architecture</span><br><span><img id="dds_01_0012__image144172161811" src="en-us_image_0284275085.png"></span></div>
<ul id="dds_01_0012__ul63108919111140"><li id="dds_01_0012__li31109359111140">Supports multiple management and control tasks, such as creating instances, changing configurations, and backing up instances. The system flexibly controls and tracks tasks, and manages exceptions based on the operations delivered by users.</li><li id="dds_01_0012__li11548782111140">Collects performance monitoring information about DB instances, including basic metrics, storage space, access requests, and the number of operations.</li><li id="dds_01_0012__li36830180111140">Collects slow query logs and access control logs, recording DB instance running status.</li><li id="dds_01_0012__li63036170111140">Backs up DB instance data and uploads it to OBS buckets. Currently, DDS supports automated and manual backup. Automated backups are kept for seven days by default.</li></ul>
<p id="dds_01_0012__p4922292317836">A replica set consists of three nodes: primary, secondary, and hidden. The three-node architecture is set up automatically, and the three nodes automatically synchronize data with each other to ensure data reliability. </p>
<ul id="dds_01_0012__ul7572160172233"><li id="dds_01_0012__li1040581172233">Primary node: Primary nodes are used to process both read and write requests.</li><li id="dds_01_0012__li9365232172233">Secondary node: Secondary nodes are used to process read requests only.</li><li id="dds_01_0012__li17178226172233">Hidden node: Hidden nodes are used to back up data.</li></ul>
<p id="dds_01_0012__p440813339588">You can perform operations on the primary and secondary nodes. If a primary node goes down or becomes faulty, the replica set elects a secondary node as a new primary node and continues normal operations. If there are no secondary nodes available, a hidden node will take over the role of the secondary node to ensure high availability. The following figure shows the replica set architecture.</p>
<div class="fignone" id="dds_01_0012__fig4417616382"><span class="figcap"><b>Figure 1 </b>Replica set architecture</span><br><span><img id="dds_01_0012__image144172161811" src="en-us_image_0000001096453886.png"></span></div>
<ul id="dds_01_0012__ul63108919111140"><li id="dds_01_0012__li18981955141813">A driver handles all interactions between your application and the database in a language appropriate to the application. For details, see <a href="https://docs.mongodb.com/drivers/" target="_blank" rel="noopener noreferrer">official documents</a>.</li><li id="dds_01_0012__li31109359111140">You can perform multiple management and control tasks, such as creating instances, changing configurations, and backing up instances. The system flexibly controls and tracks tasks, and manages exceptions based on the operations delivered by you.</li><li id="dds_01_0012__li11548782111140">You can monitor performance information about DB instances, including basic metrics, storage space, access requests, and the number of operations.</li><li id="dds_01_0012__li36830180111140">DDS collects slow query logs and access control logs, recording DB instance running status.</li><li id="dds_01_0012__li63036170111140">You can back up DB instance data and upload them to <span id="dds_01_0012__text14802123442610"></span><span id="dds_01_0012__text146030251676">OBS</span> buckets. DDS supports automated and manual backup creation. Automated backups are kept for seven days by default.</li></ul>
</div>
<div>
<div class="familylinks">

View File

@ -8,7 +8,7 @@
</li>
<li class="ulchildlink"><strong><a href="dds_01_0014.html">Database Engine and Version</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0026.html">Database Status</a></strong><br>
<li class="ulchildlink"><strong><a href="dds_01_0026.html">DB Instance Status</a></strong><br>
</li>
</ul>

View File

@ -1,7 +1,7 @@
<a name="dds_01_0014"></a><a name="dds_01_0014"></a>
<h1 class="topictitle1">Database Engine and Version</h1>
<div id="body51595365"><p id="dds_01_0014__p1125954420452">Currently, DDS is compatible with MongoDB 3.2 and 3.4 Community Edition and supports the WiredTiger storage engine, so you need to use a driver compatible with MongoDB 3.0 or later to access DDS.</p>
<div id="body51595365"><p id="dds_01_0014__p188063316106">DDS is compatible with MongoDB 3.2, 3.4, 4.0, and 4.2 Community Edition and supports the WiredTiger storage engine, so you need to use a driver compatible with MongoDB 3.0 or later to access DDS.</p>
</div>
<div>
<div class="familylinks">

View File

@ -1,11 +1,22 @@
<a name="dds_01_0015"></a><a name="dds_01_0015"></a>
<h1 class="topictitle1">Typical Application Scenarios</h1>
<div id="body21887914"><ul id="dds_01_0015__ul22015940163129"><li id="dds_01_0015__li34139046163129"><strong id="dds_01_0015__b1946100409191721">Mobile Apps and Maps</strong><p id="dds_01_0015__p62430091163134">DDS supports two-dimensional space indexes for mobile applications (Apps) and maps that have location query requests. In addition, the dynamic storage mode of DDS is suitable for storing heterogeneous data of multiple systems, meeting the requirements of this scenario.</p>
</li><li id="dds_01_0015__li42145815163129"><strong id="dds_01_0015__b84235270619186">IoT</strong><p id="dds_01_0015__p474139163136">Internet of Things (IoT) applications generate terabytes of data and have high requirements on data write performance and low requirements on data read performance. DDS provides high write performance and shard-based DB instances to meet IoT requirements.</p>
</li><li id="dds_01_0015__li23256509163129"><strong id="dds_01_0015__b842352706193635">CMS</strong><p id="dds_01_0015__p20361690163138">Content management system (CMS) has a large amount of data and queries and the data is non-structured and diverse. <span id="dds_01_0015__text13695143135220">DDS</span> provides high performance Schema-free, GridFS, and shards to support CMS applications.</p>
</li><li id="dds_01_0015__li6001897163129"><strong id="dds_01_0015__b842352706165028">Game Industry</strong><p id="dds_01_0015__p23903516163132">DDS provides schema-free to meet ever-changing requirements in the gaming industry, shortening R&amp;D periods and reducing R&amp;D costs.</p>
</li></ul>
<div id="body21887914"><div class="section" id="dds_01_0015__section166342017418"><h4 class="sectiontitle">Games</h4><p id="dds_01_0015__p11861129164115">Game players' information generated from game applications, such as players' equipment and bonus points, are stored in DDS databases. During peak hours, DDS cluster instances can handle large amounts of concurrent requests. DDS cluster and replica set provide high availability to ensure the stable running of games in high-concurrency scenarios.</p>
<p id="dds_01_0015__p16582214131320">In addition, DDS is compatible with MongoDB and provides the non-schema mode, which frees you from changing table structure when the game play mode changes. DDS can totally meet the flexible gaming requirements. You can store structured data with fixed patterns in RDS, services with flexible patterns in DDS, and hot data in Distributed Cache Service (DCS) to facilitate access to service data and reduce data storage costs.</p>
<p id="dds_01_0015__p1487912434411">Advantages:</p>
<ul id="dds_01_0015__ul03831011184419"><li id="dds_01_0015__li103831511164419">Supports embedded documents that eliminate the need to use joins to reduce application development complexity. Flexible schemas also facilitate rapid development and iteration.</li><li id="dds_01_0015__li1384171124412">Sharded clusters provide enough capacity to store data into the TB range.</li></ul>
</div>
<div class="section" id="dds_01_0015__section1665833194319"><h4 class="sectiontitle">IoT</h4><p id="dds_01_0015__p954711193331">DDS is compatible with MongoDB and provides the high-performance and asynchronous data write function. In certain scenarios, DDS can process data in the memory database. In addition, cluster instances can dynamically add the number of mongos and shard nodes or upgrade specifications. The performance and storage space can be quickly expanded, making cluster instances suitable for IoT scenarios with high concurrent writes.</p>
<p id="dds_01_0015__p11547131913331">Intelligent IoT terminals need to collect various types of data, store device logs, and analyze information in multiple dimensions. In recent years, IoT services have grown rapidly, with huge volumes of data and increasing access traffic that require horizontal expansion capabilities for data storage.</p>
<p id="dds_01_0015__p16547131910333">DDS provides the secondary index to meet dynamic query requirements and uses the MapReduce aggregation framework that is compatible with MongoDB to analyze data from multiple dimensions.</p>
<p id="dds_01_0015__p16291153516386">Advantages:</p>
<ul id="dds_01_0015__ul1129113516385"><li id="dds_01_0015__li629153573820"><strong id="dds_01_0015__b11218173765719">High Write Performance</strong>: DDS sharded cluster provides high write performance to meet the requirements of terabyte-scale databases.</li><li id="dds_01_0015__li192911435163817"><strong id="dds_01_0015__b195472573574">High Performance and Scalability</strong>: DDS supports applications with high QPS rates, and its sharding architecture can be scaled in or out to flexibly cope with application changes.</li></ul>
</div>
<div class="section" id="dds_01_0015__section1888475314442"><h4 class="sectiontitle">Internet</h4><p id="dds_01_0015__p62321512144210">DDS replica set uses the three-node HA architecture. Three data nodes form an anti-affinity group and are deployed on different physical servers to automatically synchronize data. The primary and secondary nodes provide services. Each node has a private IP address and works with Driver to allocate read workloads.</p>
<p id="dds_01_0015__p623212127421">Many organizations need to process and store data into the TB range, requiring data to be written to databases in real time and dynamic analysis capabilities in big data computing.</p>
<p id="dds_01_0015__p15202103914457">Advantages:</p>
<ul id="dds_01_0015__ul820273934513"><li id="dds_01_0015__li1620263994515"><strong id="dds_01_0015__b1096215054518">MapReduce:</strong> With a complete data analysis utility, you can query statements or scripts, and distribute requests to DDS.</li><li id="dds_01_0015__li52021039144519"><strong id="dds_01_0015__b11243163205616">Excellent Scalability</strong>: DDS DB instances can be scaled up to support growing services and data volumes in content management systems.</li></ul>
</div>
</div>
<div>
<div class="familylinks">

View File

@ -1,26 +1,55 @@
<a name="dds_01_0016"></a><a name="dds_01_0016"></a>
<h1 class="topictitle1">Related Services</h1>
<div id="body21484299"><div class="section" id="dds_01_0016__section27076184153244"><h4 class="sectiontitle">ECS</h4><p id="dds_01_0016__p52216486153724">ECS provides DDS with elastic computing resources. DDS needs to apply for resources from ECS to build a running environment for DB instances.</p>
<p id="dds_01_0016__p24174528153310">For more information, see the <em id="dds_01_0016__i84235269794635">Elastic Cloud Server User Guide</em>.</p>
</div>
<div class="section" id="dds_01_0016__section61732958153739"><h4 class="sectiontitle">EVS</h4><p id="dds_01_0016__p50907519153751">Elastic Volume Service (EVS) provides DDS with elastic storage resources. DDS needs to apply for resources from EVS to build a running environment for DB instances.</p>
<p id="dds_01_0016__p3421019715389">For more information, see the <em id="dds_01_0016__i84235269794716">Elastic Volume Service User Guide</em>.</p>
</div>
<div class="section" id="dds_01_0016__section12570197153928"><h4 class="sectiontitle">VPC</h4><p id="dds_01_0016__p36430164153951">Virtual Private Cloud (VPC) provides DDS with elastic network resources and implements network isolation and access control for your DB instances.</p>
<p id="dds_01_0016__p1631883154716">For more information, see the <em id="dds_01_0016__i842352697162817">Virtual Private Cloud User Guide</em>.</p>
</div>
<div class="section" id="dds_01_0016__section63179467154048"><h4 class="sectiontitle">OBS</h4><p id="dds_01_0016__p55438020154355">OBS stores your DDS DB instance backup files.</p>
<p id="dds_01_0016__p0416111718542">For more information, see the <em id="dds_01_0016__i969244684">Object Storage Service User Guide</em>.</p>
</div>
<div class="section" id="dds_01_0016__section1038386115490"><h4 class="sectiontitle">Cloud Eye</h4><p id="dds_01_0016__p24405891154936">Cloud Eye serves as a monitoring platform, monitoring DDS resources for you. Cloud Eye supports multiple alarm rules to ensure timely pre-warning and normal service running.</p>
<p id="dds_01_0016__p16440814155049">For more information, see the <em id="dds_01_0016__i84235269714222_3">Cloud Eye User Guide</em>.</p>
</div>
<div class="section" id="dds_01_0016__section12747782114445"><h4 class="sectiontitle">IAM</h4><p id="dds_01_0016__p4694432594530">Identity and Access Management (IAM) provides the permission management function for DDS.</p>
<p id="dds_01_0016__p1054201119298">For more information, see the <em id="dds_01_0016__i372029381105446">Identity and Access Management User Guide</em>.</p>
</div>
<div class="section" id="dds_01_0016__section11248384103457"><h4 class="sectiontitle">CTS</h4><p id="dds_01_0016__p3787666210534">Cloud Trace Service (CTS) records operations related to DDS, facilitating your further queries, audits, and retrievals.</p>
<p id="dds_01_0016__p28522244105157">For more information, see the <em id="dds_01_0016__i842352697174855">Cloud Trace Service User Guide</em>.</p>
<div id="body21484299">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_01_0016__table53462471487" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Related services</caption><thead align="left"><tr id="dds_01_0016__row123465471881"><th align="left" class="cellrowborder" valign="top" width="24.610000000000003%" id="mcps1.3.1.2.3.1.1"><p id="dds_01_0016__p203468472814">Service Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="75.39%" id="mcps1.3.1.2.3.1.2"><p id="dds_01_0016__p834616476817">Function</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_01_0016__row1934612476812"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p114252397114">Elastic Cloud Service (<span id="dds_01_0016__text138711910204615">ECS</span><span id="dds_01_0016__text12899161420467"></span>)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p1216122513418"><span id="dds_01_0016__text1326072916460">ECS</span><span id="dds_01_0016__text526022912461"></span> provides <span id="dds_01_0016__text79331325163414">DDS</span> with elastic computing resources and a running environment for DB instances.</p>
</td>
</tr>
<tr id="dds_01_0016__row33471447386"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p1334714476815">Virtual Private Cloud (VPC)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p92268503330">VPC provides DDS with elastic network resources and implements network isolation and access control for your DB instances.</p>
</td>
</tr>
<tr id="dds_01_0016__row23473471984"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p123477471081">Object Storage Service (<span id="dds_01_0016__text56321945174610">OBS</span><span id="dds_01_0016__text4707165234616"></span>)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p11514202915334">OBS stores your DDS DB instance backup files.</p>
</td>
</tr>
<tr id="dds_01_0016__row534724714814"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p43471447586">Cloud Eye</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p85481538116">Cloud Eye serves as a monitoring platform, monitoring DDS resources for you in real time. It reports alarms and issues warnings promptly to ensure that services are running properly.</p>
</td>
</tr>
<tr id="dds_01_0016__row84941556698"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p174942561096">Identity and Access Management (IAM)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p84946561913">IAM provides the permission management function for DDS.</p>
</td>
</tr>
<tr id="dds_01_0016__row93474474820"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p8347124717811">Cloud Trace Service (CTS)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p73471447487">CTS records operations related to DDS, facilitating your further queries, audits, and retrievals.</p>
</td>
</tr>
<tr id="dds_01_0016__row1551217331162"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p751293313166">Data Replication Service (DRS)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p7551956514">DRS smoothly migrates databases to the cloud. Source databases remain operational during migration, minimizing downtime and impact.</p>
</td>
</tr>
<tr id="dds_01_0016__row1787081762620"><td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.1.2.3.1.1 "><p id="dds_01_0016__p1871101752618">Key Management Service (KMS)</p>
</td>
<td class="cellrowborder" valign="top" width="75.39%" headers="mcps1.3.1.2.3.1.2 "><p id="dds_01_0016__p187171782615">KMS is a secure, reliable, and easy-to-use cloud service that helps users create, manage, and protect keys in a centralized manner.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>

View File

@ -1,7 +1,7 @@
<a name="dds_01_0017"></a><a name="dds_01_0017"></a>
<h1 class="topictitle1">User Permissions</h1>
<div id="body1522807551708"><p id="dds_01_0017__en-us_topic_0054095658_p168570320024">DDS provides two types of user permissions by default: user management and resource management.</p>
<div id="body1522807551708"><p id="dds_01_0017__en-us_topic_0054095658_p168570320024">IAM provides two types of user permissions by default: user management and resource management.</p>
<ul id="dds_01_0017__u8f0eb25ba1514424bc2e77eb3f260387"><li id="dds_01_0017__l2e33a568e55c47aea44c75c2f5e02509">User management refers to the management of users, user groups, and user group rights.</li><li id="dds_01_0017__lf545eb5ff6ac4f9b925c510c02d92abc">Resource management refers to the control operations that can be performed by users on cloud service resources.</li></ul>
<p id="dds_01_0017__p64255115101012">For details, see <a href="https://docs.otc.t-systems.com/en-us/permissions/index.html" target="_blank" rel="noopener noreferrer">Permissions</a>.</p>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,14 @@
<a name="dds_01_0021"></a><a name="dds_01_0021"></a>
<h1 class="topictitle1">System Architecture</h1>
<div id="body1574653060557"><p id="dds_01_0021__p8060118"></p>
</div>
<div id="body1568617379885"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dds_01_0011.html">Cluster Architecture</a></strong><br>
<li class="ulchildlink"><strong><a href="dds_01_0011.html">Cluster</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0012.html">Replica Set Architecture</a></strong><br>
<li class="ulchildlink"><strong><a href="dds_01_0012.html">Replica Set</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_01_0025.html">Single Node Architecture</a></strong><br>
</li>
</ul>

View File

@ -0,0 +1,69 @@
<a name="dds_01_0022"></a><a name="dds_01_0022"></a>
<h1 class="topictitle1">Constraints and Recommendations</h1>
<div id="body1522808547321"><p id="dds_01_0022__p48042784123325">To improve the stability and security of DB instances, there are some constraints on the use of DDS. For details, see <a href="#dds_01_0022__table60364850123535">Table 1</a>.</p>
<div class="tablenoborder"><a name="dds_01_0022__table60364850123535"></a><a name="table60364850123535"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_01_0022__table60364850123535" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Function constraints</caption><thead align="left"><tr id="dds_01_0022__row63835418123535"><th align="left" class="cellrowborder" valign="top" width="27.26%" id="mcps1.3.2.2.3.1.1"><p id="dds_01_0022__p3286360123535">Topic</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="72.74000000000001%" id="mcps1.3.2.2.3.1.2"><p id="dds_01_0022__p46946588123535">Constraints</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_01_0022__row65651390123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p16162334123535">Connecting to a DB instance</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><ul id="dds_01_0022__ul53814073144559"><li id="dds_01_0022__li109347144559">When connecting to a DB instance over private networks, bind an EIP to the prepared <span id="dds_01_0022__text20405152124119">ECS</span><span id="dds_01_0022__text0200182784119"></span>.</li><li id="dds_01_0022__li46337654144559">By default, DDS is not accessible from <span id="dds_01_0022__text1154045714412">ECS</span><span id="dds_01_0022__text55401557144113"></span>s that are not in the same security group. If the ECS is not in the same security group, you need to add an inbound rule to enable access.</li><li id="dds_01_0022__li29581666144559">The default DDS port is 8635, but this port can be modified if necessary.</li></ul>
</td>
</tr>
<tr id="dds_01_0022__row53074217123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p4044355123535">Deployment</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p41829298123535">ECS instances in which DB instances are deployed are not visible to you. Your applications can access the database only through an IP address and port.</p>
</td>
</tr>
<tr id="dds_01_0022__row60017787123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p29602599123535">Obtaining permissions of user <strong id="dds_01_0022__b84235270617431">rwuser</strong></p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p738283513565">Only the <strong id="dds_01_0022__en-us_topic_0105284934_b84235270694322">rwuser</strong> user permissions are provided on the instance creation page.</p>
<p id="dds_01_0022__p1716401218589">For details about the related commands, see <a href="dds_03_0033.html">Which Commands are Supported or Restricted by DDS?</a></p>
</td>
</tr>
<tr id="dds_01_0022__row62985361123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p1540641123535">Setting database parameters</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p3859309423"></p>
<p id="dds_01_0022__p159333074217"></p>
<p id="dds_01_0022__p109814306422">Most database parameters in the parameter templates you created can be modified. For details, see section <a href="en-us_topic_configuration.html">Modifying a Parameter Template</a>.</p>
</td>
</tr>
<tr id="dds_01_0022__row19812839123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p61336152123535">Migrating data</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p52021072133834">You can use multiple tools to migrate your data between databases, such as mongoexport and mongoimport. For details, see section <a href="dds_03_0052.html">Migrating Data</a>.</p>
</td>
</tr>
<tr id="dds_01_0022__row18357798134159"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p255375813428">Storage engine</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p2528698134215">DDS supports the WiredTiger storage engine.</p>
</td>
</tr>
<tr id="dds_01_0022__row791814564293"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p0919056182920">Nodes</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p291975622911">Mongos and shard nodes that are successfully added cannot be deleted.</p>
</td>
</tr>
<tr id="dds_01_0022__row43544108123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p37411822123535">Restarting a DB instance or a node</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p41132837123535">DB instances cannot be restarted using commands. They must be restarted on the management console.</p>
</td>
</tr>
<tr id="dds_01_0022__row27804808123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_01_0022__p37597003123535">Viewing DDS backup files</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_01_0022__p63693518173">DDS backups are saved in OBS buckets but these cannot be accessed directly. You can download and view the files on the DDS console. For details, see section <a href="en-us_topic_backup_download.html">Downloading Backup Files</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_user_guide.html">Introduction</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
<a name="dds_01_0025"></a><a name="dds_01_0025"></a>
<h1 class="topictitle1">Single Node Architecture</h1>
<div id="body1524735072535"><p id="dds_01_0025__p16172345183814">A single node instance, as its name suggests, contains only one node which can be accessed directly.</p>
<p id="dds_01_0025__p34524004112">As a supplement to the cluster and replica set architectures, the single-node architecture applies to R&amp;D, testing, and non-core data storage of enterprises. While not as robust as replica sets, the single node architecture can be a less expensive way to visualize O&amp;M and provide elastic scaling.</p>
<div class="note" id="dds_01_0025__note1658561782711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_01_0025__p742382512270">A driver handles all interactions between your application and the database in a language appropriate to the application. For details, see <a href="https://docs.mongodb.com/drivers/" target="_blank" rel="noopener noreferrer">official documents</a>.</p>
</div></div>
<div class="fignone" id="dds_01_0025__fig127610919118"><span class="figcap"><b>Figure 1 </b>Single node architecture</span><br><span><img id="dds_01_0025__image57779121115" src="en-us_image_0000001143053863.png"></span></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_01_0021.html">System Architecture</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@
<h1 class="topictitle1">Regions and AZs</h1>
<div id="body1511510332269"><p id="dds_01_0027__p0522201215253">A region is a geographic area in which resources used by DDS are located.</p>
<p id="dds_01_0027__p50892465165029">Each region comprises one or more AZs and is completely isolated from other regions. AZs within the same region can communicate with one another through an internal network, while those in different regions cannot communicate with one another through an internal network.</p>
<p id="dds_01_0027__p91315267277">Public cloud data centers are deployed worldwide. <span id="dds_01_0027__text1593513910362">DDS</span> applies to different regions. Provisioning DDS to specific regions can better meet user requirements. For example, applications can be designed to better meet specific user requirements or comply with local laws and other demands.</p>
<p id="dds_01_0027__p14131112642720">Each region contains many AZs where power and networks are physically isolated. AZs in the same region can communicate with each other over an intranet. Each AZ provides cost-effective and low-latency network connections that are unaffected by faults in other AZs. As a result, provisioning DDS in separate AZs protects your applications against local faults that occur in a single location. DDS supports the deployment of a replica set instance across three AZs. It means that the primary, secondary, and hidden nodes are deployed in three AZs for disaster recovery.</p>
<p id="dds_01_0027__p50892465165029">Each region comprises one or more AZs and is completely isolated from other regions. AZs within the same region can communicate with one another through an internal network.</p>
<p id="dds_01_0027__p91315267277">Cloud service platform data centers are deployed worldwide. <span id="dds_01_0027__text1593513910362">DDS</span> applies to different regions. Provisioning DDS to specific regions can better meet user requirements. For example, applications can be designed to better meet specific user requirements or comply with local laws and other demands.</p>
<p id="dds_01_0027__p1258314172818">Each region contains many AZs where power and networks are physically isolated. AZs in the same region can communicate with each other over an intranet. Each AZ provides cost-effective and low-latency network connections that are unaffected by faults in other AZs. As a result, provisioning DDS in separate AZs protects your applications against local faults that occur in a single location. DDS allows you to deploy replica sets across three AZs for disaster recovery.</p>
</div>
<div>
<div class="familylinks">

View File

@ -0,0 +1,46 @@
<a name="dds_02_0001"></a><a name="dds_02_0001"></a>
<h1 class="topictitle1">Connection Methods</h1>
<div id="body1568809486862"><p id="dds_02_0001__p1844611220281">You can access DDS over private or public networks.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_02_0001__table34881931174318" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Connection methods</caption><thead align="left"><tr id="dds_02_0001__row248916316436"><th align="left" class="cellrowborder" valign="top" width="14.85148514851485%" id="mcps1.3.2.2.5.1.1"><p id="dds_02_0001__p94898312434">Method</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.861386138613863%" id="mcps1.3.2.2.5.1.2"><p id="dds_02_0001__p10489131104311">IP Address</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.56435643564357%" id="mcps1.3.2.2.5.1.3"><p id="dds_02_0001__p5489103154315">Scenario</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.722772277227726%" id="mcps1.3.2.2.5.1.4"><p id="dds_02_0001__p98541156195517">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_02_0001__row248973134318"><td class="cellrowborder" valign="top" width="14.85148514851485%" headers="mcps1.3.2.2.5.1.1 "><p id="dds_02_0001__p48571255124517">Private network</p>
</td>
<td class="cellrowborder" valign="top" width="13.861386138613863%" headers="mcps1.3.2.2.5.1.2 "><p id="dds_02_0001__p15489153115438">Private IP address</p>
</td>
<td class="cellrowborder" valign="top" width="43.56435643564357%" headers="mcps1.3.2.2.5.1.3 "><p id="dds_02_0001__p7735048144619">DDS provides a private IP address by default.</p>
<ul id="dds_02_0001__ul1044172235218"><li id="dds_02_0001__li2443225522">You are advised to use private IP address in following scenarios:<ul id="dds_02_0001__ul145143011523"><li id="dds_02_0001__li2041622755210">Your ECS instance is in the same VPC subnet as the DDS DB instance.</li><li id="dds_02_0001__li1541614275520">ECS subnet and DDS subnet are connected to each other by VPC peering.</li></ul>
</li></ul>
<ul id="dds_02_0001__ul53814073144559"><li id="dds_02_0001__li46337654144559">By default, DDS is not accessible from ECSs that are not in the same security group. If the ECS is not in the same security group, you need to add an inbound rule to enable access.</li><li id="dds_02_0001__li29581666144559">The default DDS port is 8635, but this port can be modified if necessary. You are advised to modify the port to ensure database security.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="27.722772277227726%" headers="mcps1.3.2.2.5.1.4 "><p id="dds_02_0001__p226615564401">Secure and excellent performance</p>
</td>
</tr>
<tr id="dds_02_0001__row871255113459"><td class="cellrowborder" valign="top" width="14.85148514851485%" headers="mcps1.3.2.2.5.1.1 "><p id="dds_02_0001__p55021336184516">Public network</p>
</td>
<td class="cellrowborder" valign="top" width="13.861386138613863%" headers="mcps1.3.2.2.5.1.2 "><p id="dds_02_0001__p82865106568"><span id="dds_02_0001__text1298211419563"></span><span id="dds_02_0001__text1091771855618">EIP</span></p>
</td>
<td class="cellrowborder" valign="top" width="43.56435643564357%" headers="mcps1.3.2.2.5.1.3 "><ul id="dds_02_0001__ul12205828421"><li id="dds_02_0001__li1633020014213">If your applications are running on an <span id="dds_02_0001__text196551747195519">ECS</span><span id="dds_02_0001__text1865514745511"></span> that is in a different region from the one where the DB instance is located, you are advised to use an EIP to connect the ECS to your DDS DB instances.</li><li id="dds_02_0001__li163980484214">If your applications are deployed on another cloud platform, EIP is recommended.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="27.722772277227726%" headers="mcps1.3.2.2.5.1.4 "><ul id="dds_02_0001__ul58856110012"><li id="dds_02_0001__li15886121406">Low security</li><li id="dds_02_0001__li9886319016">For faster transmission and improved security, you are advised to migrate your applications to an ECS that is in the same subnet as your DDS instance and use a private IP address to access the DDS instance.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_cluster.html">Getting Started with Clusters</a></div>
</div>
</div>

View File

@ -1,65 +0,0 @@
<a name="dds_02_0002"></a><a name="dds_02_0002"></a>
<h1 class="topictitle1">Restrictions</h1>
<div id="body1522808547321"><p id="dds_02_0002__p48042784123325">To improve the stability and security of DB instances, there are some restrictions on the use of DDS. For details, see <a href="#dds_02_0002__table60364850123535">Table 1</a>.</p>
<div class="tablenoborder"><a name="dds_02_0002__table60364850123535"></a><a name="table60364850123535"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_02_0002__table60364850123535" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Function restrictions</caption><thead align="left"><tr id="dds_02_0002__row63835418123535"><th align="left" class="cellrowborder" valign="top" width="27.26%" id="mcps1.3.2.2.3.1.1"><p id="dds_02_0002__p3286360123535"><strong id="dds_02_0002__b29577244123535">Operation</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="72.74000000000001%" id="mcps1.3.2.2.3.1.2"><p id="dds_02_0002__p46946588123535"><strong id="dds_02_0002__b842352706171539">Restrictions</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dds_02_0002__row65651390123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p16162334123535">Connecting to a DB instance through a client</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><ul id="dds_02_0002__ul53814073144559"><li id="dds_02_0002__li109347144559">To access a <span class="keyword" id="dds_02_0002__keyword159551725101016">DDS DB instance</span> which is not publicly accessible from an ECS, the instance must be in the same VPC subnet as the ECS.</li><li id="dds_02_0002__li46337654144559">By default, DDS cannot be accessed through an ECS in a different security group. You need to add an inbound rule to the DDS security group.</li><li id="dds_02_0002__li29581666144559">The default DDS port number is 8635. You can change it if you want to access DDS through another port.</li></ul>
</td>
</tr>
<tr id="dds_02_0002__row53074217123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p4044355123535">Deployment</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p41829298123535">ECSs in which DB instances are deployed are not visible to you. Your applications can access the database only through an IP address and port.</p>
</td>
</tr>
<tr id="dds_02_0002__row60017787123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p29602599123535">Obtaining permissions of user <strong id="dds_02_0002__b84235270617431">rwuser</strong></p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p738283513565">Only the <strong id="dds_02_0002__en-us_topic_0105284934_b84235270694322">rwuser</strong> user permissions are provided on the instance creation page.</p>
<p id="dds_02_0002__p1716401218589">For details about the related commands, see <a href="dds_faq_0033.html">Which Commands are Supported or Restricted by DDS?</a></p>
</td>
</tr>
<tr id="dds_02_0002__row62985361123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p1540641123535">Setting database parameters</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p3859309423"></p>
<p id="dds_02_0002__p159333074217"></p>
<p id="dds_02_0002__p109814306422">Most database parameters in the parameter groups you created can be modified. For details, see section <a href="en-us_topic_configuration.html">Editing a Parameter Group</a>.</p>
<p id="dds_02_0002__p51021730164220"></p>
</td>
</tr>
<tr id="dds_02_0002__row19812839123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p61336152123535">Migrating data</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p52021072133834">You can use command line tools, including mongoexport and mongoimport, to migrate data. For details, see section <a href="dds_03_0052.html">Migrating Data</a>.</p>
</td>
</tr>
<tr id="dds_02_0002__row18357798134159"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p255375813428">Storage engine</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p2528698134215">The WiredTiger storage engine is supported.</p>
</td>
</tr>
<tr id="dds_02_0002__row43544108123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p37411822123535">Restarting a DB instance or a node</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p41132837123535">A DDS DB instance must be restarted on the DDS console.</p>
</td>
</tr>
<tr id="dds_02_0002__row27804808123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0002__p37597003123535">Viewing DDS backup files</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0002__p63693518173">You can download and view the backup files on the DDS console. For details, see section <a href="en-us_topic_backup_download.html">Downloading Backup Files</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_cluster.html">Getting Started with Clusters</a></div>
</div>
</div>

View File

@ -1,17 +0,0 @@
<a name="dds_02_0003"></a><a name="dds_02_0003"></a>
<h1 class="topictitle1">Service Process</h1>
<div id="body1522808547321"><p id="dds_02_0003__p8514761141515">This section describes how to create a cluster instance, set a security group, and connect to a cluster instance.</p>
<div class="section" id="dds_02_0003__section15744754141943"><h4 class="sectiontitle">Intended Audience</h4><ul id="dds_02_0003__ul3823213891623"><li id="dds_02_0003__li3530047291644">Users who create the DDS DB instance for the first time.</li><li id="dds_02_0003__li5410008191623">Users who need to perform the initial configuration after a DB instance is created.</li><li id="dds_02_0003__li2821380891638">Users who want to know how to connect to the DDS DB instances.</li></ul>
</div>
<div class="section" id="dds_02_0003__section10506471114332"><h4 class="sectiontitle">Process</h4><p id="dds_02_0003__p18714184141515">The following describes the steps from creating a DB instance to using it.</p>
<div class="fignone" id="dds_02_0003__fig34101010182111"><span class="figcap"><b>Figure 1 </b>Accessing DB instances from a public network</span><br><span><img id="dds_02_0003__image1841001014216" src="en-us_image_0284274985.png"></span></div>
<div class="fignone" id="dds_02_0003__fig622427152416"><span class="figcap"><b>Figure 2 </b>Accessing DB instances from a private network</span><br><span><img id="dds_02_0003__image422447152412" src="en-us_image_0284275243.png"></span></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_cluster.html">Getting Started with Clusters</a></div>
</div>
</div>

View File

@ -1,56 +0,0 @@
<a name="dds_02_0005"></a><a name="dds_02_0005"></a>
<h1 class="topictitle1">Setting a Security Group</h1>
<div id="body1522808547321"><div class="section" id="dds_02_0005__section3152058916230"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0005__p43222116204125">This section guides you on how to add a security group rule to control access from and to <span class="keyword" id="dds_02_0005__keyword943913121715">DDS DB instances</span> in a security group.</p>
</div>
<div class="section" id="dds_02_0005__section1282916720425"><h4 class="sectiontitle">Background Information</h4><p id="dds_02_0005__p27630095204125">You can access a DDS DB instance in either of the following ways:</p>
<ul id="dds_02_0005__ul47344269204125"><li id="dds_02_0005__li23445242204125">Public network</li><li id="dds_02_0005__li10720689204125">Internal network</li></ul>
</div>
<div class="section" id="dds_02_0005__section14550984204232"><h4 class="sectiontitle">Precautions</h4><p id="dds_02_0005__p5854544204125">The default security group rule allows all outgoing data packets. ECSs and DDS DB instances can access each other in the same security group. After a security group is created, you can add security group rules to control the access from and to the DDS DB instances in the security group.</p>
<p id="dds_02_0005__p1012315204125">By default, a tenant can create a maximum of 500 security group rules. An excessive number of security group rules increases the network latency of the first packet. It is recommended that you add a maximum of 50 rules for each security group.</p>
<p id="dds_02_0005__p41200900204125">To access the DDS DB instances in a security group from external resources, create an inbound rule for the security group.</p>
</div>
<div class="section" id="dds_02_0005__section25078651204428"><h4 class="sectiontitle"><strong id="dds_02_0005__b15424473204153">Procedure</strong></h4><ol id="dds_02_0005__ol49383781586"><li id="dds_02_0005__li93899141586"><span>Log in to the management console.</span></li><li id="dds_02_0005__li1870917810588"><span>Click <span><img id="dds_02_0005__image070916845819" src="en-us_image_0284275123.png"></span> in the upper left corner and select a region and project.</span></li><li id="dds_02_0005__li297543615857"><span>Click <strong id="dds_02_0005__b10763925113313">Service List</strong>. Under <strong id="dds_02_0005__b842352706191157">Network</strong>, click <strong id="dds_02_0005__b84235270619120">Virtual Private Cloud</strong>.</span></li><li id="dds_02_0005__li3171015115916"><span>In the navigation pane on the left, choose <strong id="dds_02_0005__b18843268317">Access Control</strong> &gt; <strong id="dds_02_0005__b188862267314">Security Groups</strong>.</span></li><li id="dds_02_0005__li140569415930"><span>On the <strong id="dds_02_0005__b9169741348">Security Group</strong> page, click the security group name.</span></li><li id="dds_02_0005__li5489049115946"><span>On the <strong id="dds_02_0005__b156479192710">Inbound Rules</strong> tab, click <strong id="dds_02_0005__b842352706174533">Add Rule</strong>. In the displayed <strong id="dds_02_0005__b84235270617460">Add Inbound Rule</strong> dialog box, set required parameters to add inbound rules. On the <strong id="dds_02_0005__b842352706155549">Outbound Rules</strong> tab, click <strong id="dds_02_0005__b84235270615562">Add Rule</strong>. In the displayed <strong id="dds_02_0005__b64452812619">Add Outbound Rule</strong> dialog box, set required parameters to add outbound rules.</span></li><li id="dds_02_0005__li6900819151212"><span>Add a security group rule as prompted.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_02_0005__en-us_topic_0118534005_table532116198213" width="90%" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Field description</caption><thead align="left"><tr id="dds_02_0005__en-us_topic_0118534005_row731911191722"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.2.7.2.1.2.4.1.1"><p id="dds_02_0005__en-us_topic_0118534005_p17319119020"><strong id="dds_02_0005__b6507101123818">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63%" id="mcps1.3.4.2.7.2.1.2.4.1.2"><p id="dds_02_0005__en-us_topic_0118534005_p431911191622"><strong id="dds_02_0005__b1979812213380">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.2.7.2.1.2.4.1.3"><p id="dds_02_0005__en-us_topic_0118534005_p103191119621"><strong id="dds_02_0005__b84235270617550">Value Example</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dds_02_0005__en-us_topic_0118534005_row8320419723"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.7.2.1.2.4.1.1 "><p id="dds_02_0005__en-us_topic_0118534005_p1432013199214">Protocol</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.7.2.1.2.4.1.2 "><p id="dds_02_0005__en-us_topic_0118534005_p432017191726">Specifies the network protocol. Allows all traffic or supports user-defined protocols, TCP, UDP, ICMP, and SSH.</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.7.2.1.2.4.1.3 "><p id="dds_02_0005__en-us_topic_0118534005_p1332014191216">TCP</p>
</td>
</tr>
<tr id="dds_02_0005__row15380125810476"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.7.2.1.2.4.1.1 "><p id="dds_02_0005__p1538118582479">Port</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.7.2.1.2.4.1.2 "><p id="dds_02_0005__p1391312104488">Specifies the port allowing the access to ECSs or external devices. </p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.7.2.1.2.4.1.3 "><p id="dds_02_0005__p1438118583479">8635</p>
</td>
</tr>
<tr id="dds_02_0005__en-us_topic_0118534005_row1732101910217"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.7.2.1.2.4.1.1 "><p id="dds_02_0005__en-us_topic_0118534005_p16320131918211">Source/Destination</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.7.2.1.2.4.1.2 "><p id="dds_02_0005__p1953711281854">Specifies the supported IP address and security group.</p>
<ul id="dds_02_0005__en-us_topic_0118534005_ul474117187016"><li id="dds_02_0005__li204213179474"><strong id="dds_02_0005__b812614895114">IP address</strong>: indicates that the security group rule takes effect in a specified IP address range.<ul id="dds_02_0005__ul67881445105111"><li id="dds_02_0005__en-us_topic_0118534005_li87410184011">xxx.xxx.xxx.xxx/32 (IPv4)</li><li id="dds_02_0005__en-us_topic_0118534005_li1374113189012">xxx.xxx.xxx.0/24 (subnet)</li><li id="dds_02_0005__en-us_topic_0118534005_li167411218306">0.0.0.0/0 (any IP address)</li></ul>
</li><li id="dds_02_0005__li1390210401514"><strong id="dds_02_0005__b71025536519">Security group</strong>: indicates that this rule allows all IP addresses of ECSs to access DDS DB instances in the same specified security group.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.7.2.1.2.4.1.3 "><ul id="dds_02_0005__ul209321608538"><li id="dds_02_0005__li119329015535">192.168.10.0/24</li><li id="dds_02_0005__li209327055311">default</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="dds_02_0005__li21369327151121"><span>Click <strong id="dds_02_0005__b842352706113845">OK</strong>.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_cluster.html">Getting Started with Clusters</a></div>
</div>
</div>

View File

@ -1,25 +1,85 @@
<a name="dds_02_0006"></a><a name="dds_02_0006"></a>
<h1 class="topictitle1">Binding and Unbinding an EIP</h1>
<div id="body1522136462404"><div class="section" id="dds_02_0006__section055104935914"><a name="dds_02_0006__section055104935914"></a><a name="section055104935914"></a><h4 class="sectiontitle"><strong id="dds_02_0006__b10875147182618">Scenarios</strong></h4><p id="dds_02_0006__p6551149135917">You can access DDS through a private IP address or an EIP. The application scenario of the connection address is as follows:</p>
<ul id="dds_02_0006__ul115584945912"><li id="dds_02_0006__li14552049185915">Use a private IP address when:<p id="dds_02_0006__p12551049155916"><a name="dds_02_0006__li14552049185915"></a><a name="li14552049185915"></a>DDS provides a private IP address by default.</p>
<p id="dds_02_0006__p75510491599">Your applications are deployed on an ECS in a region where your cluster instance is located.</p>
</li></ul>
<ul id="dds_02_0006__ul1855449105913"><li id="dds_02_0006__li135514925912">Use an EIP when:<ul id="dds_02_0006__ul125516499595"><li id="dds_02_0006__li255104965916">Your applications are deployed on an ECS in a region separated from the region where your cluster instance is located.</li><li id="dds_02_0006__li65544917591">Your applications are deployed on another cloud platform.</li></ul>
</li></ul>
<h1 class="topictitle1">Connecting to a Cluster Instance Over Public Networks</h1>
<div id="body1568789840716"><div class="section" id="dds_02_0006__section46429645141251"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0006__p125004821516">This section describes how to connect to a cluster instance using the MongoDB client and Robo 3T over public networks.</p>
<p id="dds_02_0006__p69231113101918">The MongoDB client and Robo 3T can connect to a DB instance with an unencrypted connection or an encrypted connection (SSL). To improve data transmission security, you are advised to connect to DB instances using the SSL connection.</p>
<p id="dds_02_0006__p293321134111"><strong id="dds_02_0006__b113673415591">Different OS scenarios</strong>: Examples include Linux and Windows clients.</p>
</div>
<div class="section" id="dds_02_0006__section1130510262514"><h4 class="sectiontitle">Precautions</h4><ul id="dds_02_0006__ul15712132844"><li id="dds_02_0006__li13712152748">Before accessing a database, you need to apply for an EIP on the VPC console. Then, add an inbound rule to allow the IP addresses or IP address ranges of ECSs. For details, see section <a href="dds_02_0005.html">Setting a Security Group</a>.</li><li id="dds_02_0006__li137122023418">In the cluster instance, only mongos can be bound to an EIP. To change the EIP that has been bound to a node, you need to unbind it from the node first.</li></ul>
<div class="section" id="dds_02_0006__section12950115493212"><h4 class="sectiontitle">Prerequisites</h4><ol id="dds_02_0006__ol3246193120481"><li id="dds_02_0006__li157944426489"><a href="dds_02_0046.html">Bind an EIP</a> to the cluster instance and <a href="dds_02_0019.html">set security group rules</a> to ensure that the EIP can be accessed with the DB client application.</li><li id="dds_02_0006__li1166891112506">Install the MongoDB client or Robo 3T.<p id="dds_02_0006__p117191137520"><a name="dds_02_0006__li1166891112506"></a><a name="li1166891112506"></a><strong id="dds_02_0006__b109142212262">MongoDB client</strong></p>
<ol type="a" id="dds_02_0006__ol135814209524"><li id="dds_02_0006__li1258020155214">For details on how to create and log in to an ECS, see "Creating and Logging In to a Windows ECS" or "Creating and Logging In to a Linux ECS" in the <em id="dds_02_0006__i102641425142618">Elastic Cloud Server User Guide</em>.</li><li id="dds_02_0006__li1369583718523">Install the MongoDB client on the <span id="dds_02_0006__text169821124175219">ECS</span><span id="dds_02_0006__text1798242413528"></span>.<p id="dds_02_0006__p1760103735017">For details on how to install a MongoDB client, see <a href="dds_faq_0018.html">How Can I Install a MongoDB Client?</a></p>
<div class="note" id="dds_02_0006__note11972884015"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_02_0006__p093280409">If you use a <a href="#dds_02_0006__li122297367491">connection address</a> to connect to a cluster instance, download the MongoDB client of version later than 3.4.</p>
</div></div>
</li></ol>
<p id="dds_02_0006__p1334835714533"><strong id="dds_02_0006__b101452013144419">Robo 3T</strong></p>
<p id="dds_02_0006__p1115016437200">For details on how to install Robo 3T, see <a href="dds_faq_0039.html">How Do I Install Robo 3T?</a></p>
</li><li id="dds_02_0006__li1647003915233">If SSL is enabled, download the SSL certificate on the DDS console.<ol type="a" id="dds_02_0006__ol122491412162415"><li id="dds_02_0006__li885613240">On the <strong id="dds_02_0006__b8193952144714">Instance Management</strong> page, click the target DB instance.</li><li id="dds_02_0006__li17853172410">In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0006__uicontrol10505185634710"><b>Connections</b></span>.</li><li id="dds_02_0006__li0861616247">In the <strong id="dds_02_0006__b899316118482">Basic Information</strong> area, click <span><img id="dds_02_0006__image1586141132414" src="en-us_image_0000001143133809.png"></span> next to the <strong id="dds_02_0006__b149951416485">SSL</strong> field.</li></ol>
<div class="note" id="dds_02_0006__note65334596815"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_02_0006__p1853419598812">The certificate can also be downloaded from the <strong id="dds_02_0006__b119389234616">Node Information</strong> area on the <strong id="dds_02_0006__b152515107464">Basic Information</strong> page.</p>
</div></div>
<p id="dds_02_0006__p26963441286"></p>
</li></ol>
</div>
<div class="section" id="dds_02_0006__section0463161611514"><a name="dds_02_0006__section0463161611514"></a><a name="section0463161611514"></a><h4 class="sectiontitle">Binding an EIP</h4><ol id="dds_02_0006__ol12603704105129"><li id="dds_02_0006__li46324476105129"><span>On the <strong id="dds_02_0006__b84235270615219">Instance Management</strong> page, click the target cluster instance.</span></li><li id="dds_02_0006__li349825362319"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0006__uicontrol4786037163118"><b>Connections</b></span>. </span></li><li id="dds_02_0006__li38329011165953"><span>In the <strong id="dds_02_0006__b17715154217247">Basic Information</strong> area, locate the target mongos node and click <strong id="dds_02_0006__b1971744216246">Bind EIP</strong> in the <strong id="dds_02_0006__b15719154214242">Operation</strong> column.</span></li><li id="dds_02_0006__li14267104105129"><span>In the displayed dialog box, all EIPs in the unbound status are listed. Select the required EIP and click <strong id="dds_02_0006__b842352706204348">OK</strong>. If no available EIPs are displayed, click <span class="uicontrol" id="dds_02_0006__uicontrol64968849151523"><b>View EIP</b></span> and create an EIP on the VPC console.</span></li><li id="dds_02_0006__li17560260102159"><span>In the <strong id="dds_02_0006__b842352706105036">EIP</strong> column on the <strong id="dds_02_0006__b842352706105039">mongos</strong> tab, view the EIP that is successfully bound.</span><p><p id="dds_02_0006__p32760134103252">To unbind an EIP from the DB instance, see <a href="#dds_02_0006__section1139494151519">Unbinding an EIP</a>.</p>
<div class="section" id="dds_02_0006__section164987203"><h4 class="sectiontitle">Connecting to a DB Instance Using Robo 3T (SSL)</h4><div class="notice" id="dds_02_0006__note19423175081418"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0006__p8755899182235">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0006__ol10410812012"><li id="dds_02_0006__li185384203"><span>Run the installed Robo 3T. On the displayed dialog box, click <strong id="dds_02_0006__b1836854274819">Create</strong>.</span><p><div class="fignone" id="dds_02_0006__fig19519816206"><span class="figcap"><b>Figure 1 </b>Connections</span><br><span><img id="dds_02_0006__image135158132018" src="en-us_image_0000001095974050.png"></span></div>
</p></li><li id="dds_02_0006__li1253872015"><span>In the <strong id="dds_02_0006__b19458104212492">Connection Settings</strong> dialog box, set the parameters of the new connection.</span><p><ol type="a" id="dds_02_0006__ol1855818201"><li id="dds_02_0006__li105108102010">On the <strong id="dds_02_0006__b116092685017">Connection</strong> tab, enter the name of the new connection in the <strong id="dds_02_0006__b560916685015">Name</strong> text box and enter the EIP and database port that are bound to the DDS DB instance in the <strong id="dds_02_0006__b12610206145014">Address</strong> text box.<div class="fignone" id="dds_02_0006__fig5588172012"><span class="figcap"><b>Figure 2 </b>Connection</span><br><span><img id="dds_02_0006__image55982207" src="en-us_image_0000001143133815.png"></span></div>
</li><li id="dds_02_0006__li5512811202">On the <strong id="dds_02_0006__b14535122605711">Authentication</strong> tab, set <strong id="dds_02_0006__b35361926165711">Database</strong> to <strong id="dds_02_0006__b65369269579">admin</strong>, <strong id="dds_02_0006__b185371626165714">User Name</strong> to <strong id="dds_02_0006__b6538726165711">rwuser</strong>, and <strong id="dds_02_0006__b1553962675718">Password</strong> to the administrator password you set during the creation of the cluster instance.<div class="fignone" id="dds_02_0006__fig18578142013"><span class="figcap"><b>Figure 3 </b>Authentication</span><br><span><img id="dds_02_0006__image254892018" src="en-us_image_0000001142773917.png"></span></div>
</li><li id="dds_02_0006__li1648133312283">On the <strong id="dds_02_0006__b334594414589">SSL</strong> tab, upload the SSL certificate and select <strong id="dds_02_0006__b42335815914">Allowed</strong> for <strong id="dds_02_0006__b1716975895819">Invalid Hostnames</strong>.<div class="fignone" id="dds_02_0006__fig14399846163217"><span class="figcap"><b>Figure 4 </b>SSL</span><br><span><img id="dds_02_0006__image3401646143216" src="en-us_image_0000001142773909.png"></span></div>
</li><li id="dds_02_0006__li451281205">Click <strong id="dds_02_0006__b48381225145919">Save</strong>.</li></ol>
</p></li><li id="dds_02_0006__li75198122012"><span>On the <strong id="dds_02_0006__b3685201202">MongoDB Connections</strong> page, click <strong id="dds_02_0006__b152941510804">Connect</strong> to connect to the cluster instance.</span><p><div class="fignone" id="dds_02_0006__fig1861685205"><span class="figcap"><b>Figure 5 </b>Connections</span><br><span><img id="dds_02_0006__image6616822012" src="en-us_image_0000001096453848.png"></span></div>
</p></li><li id="dds_02_0006__li13615852014"><span>If the cluster instance is successfully connected, the page shown in <a href="#dds_02_0006__fig156158172016">Figure 6</a> is displayed.</span><p><div class="fignone" id="dds_02_0006__fig156158172016"><a name="dds_02_0006__fig156158172016"></a><a name="fig156158172016"></a><span class="figcap"><b>Figure 6 </b>Connection succeeded</span><br><span><img id="dds_02_0006__image76981207" src="en-us_image_0000001096293856.png"></span></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0006__section1139494151519"><a name="dds_02_0006__section1139494151519"></a><a name="section1139494151519"></a><h4 class="sectiontitle">Unbinding an EIP</h4><ol id="dds_02_0006__ol31276680102616"><li id="dds_02_0006__li35235350102616"><span>On the <strong id="dds_02_0006__b34027572411917">Instance Management</strong> page, click the target cluster instance.</span></li><li id="dds_02_0006__li15539153193217"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0006__uicontrol17211152912257"><b>Connections</b></span>. </span></li><li id="dds_02_0006__li417442102629"><span>In the <strong id="dds_02_0006__b1757933115255">Basic Information</strong> area, locate the target mongos node and click <strong id="dds_02_0006__b85791731142520">Unbind EIP</strong> in the <strong id="dds_02_0006__b11580183111252">Operation</strong> column.</span></li><li id="dds_02_0006__li56439840102720"><span>In the displayed dialog box, click <strong id="dds_02_0006__b9698561399">OK</strong> to unbind the EIP.</span><p><p id="dds_02_0006__p21771104103056">To bind an EIP to the DB instance again, see <a href="#dds_02_0006__section0463161611514">Binding an EIP</a>.</p>
<div class="section" id="dds_02_0006__section238792617370"><h4 class="sectiontitle">Connecting to a DB Instance Using Robo 3T (Non-SSL)</h4><div class="notice" id="dds_02_0006__note108611919153714"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0006__p12899153145011">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0006__ol0891837112610"><li id="dds_02_0006__li18891123792617"><span>Run the installed Robo 3T. On the displayed dialog box, click <strong id="dds_02_0006__b11156205915115">Create</strong>.</span><p><div class="fignone" id="dds_02_0006__fig8324212122213"><span class="figcap"><b>Figure 7 </b>Connections</span><br><span><img id="dds_02_0006__image1132521202215" src="en-us_image_0000001143053817.png"></span></div>
</p></li><li id="dds_02_0006__li1189173715261"><span>In the <strong id="dds_02_0006__b991112813216">Connection Settings</strong> dialog box, set the parameters of the new connection.</span><p><ol type="a" id="dds_02_0006__ol12321221151517"><li id="dds_02_0006__li20443123311916">On the <strong id="dds_02_0006__b1924412361722">Connection</strong> tab, enter the name of the new connection in the <strong id="dds_02_0006__b724410362215">Name</strong> text box and enter the EIP and database port that are bound to the DDS DB instance in the <strong id="dds_02_0006__b182448366214">Address</strong> text box.<div class="fignone" id="dds_02_0006__fig45982550220"><span class="figcap"><b>Figure 8 </b>Connection</span><br><span><img id="dds_02_0006__image5948113816347" src="en-us_image_0000001142773911.png"></span></div>
</li><li id="dds_02_0006__li1444383310912">On the <strong id="dds_02_0006__b1787314461622">Authentication</strong> tab, set <strong id="dds_02_0006__b13874114615218">Database</strong> to <strong id="dds_02_0006__b1087413461921">admin</strong>, <strong id="dds_02_0006__b2875154612218">User Name</strong> to <strong id="dds_02_0006__b148766469213">rwuser</strong>, and <strong id="dds_02_0006__b1887634620219">Password</strong> to the administrator password you set during the creation of the cluster instance.<div class="fignone" id="dds_02_0006__fig19511154611251"><span class="figcap"><b>Figure 9 </b>Authentication</span><br><span><img id="dds_02_0006__image10344850193610" src="en-us_image_0000001143053819.png"></span></div>
</li><li id="dds_02_0006__li34439331693">Click <strong id="dds_02_0006__b1617515511520">Save</strong>.</li></ol>
</p></li><li id="dds_02_0006__li38913377264"><span>On the <strong id="dds_02_0006__b1318125414219">MongoDB Connections</strong> page, click <strong id="dds_02_0006__b918214541125">Connect</strong> to connect to the cluster instance.</span><p><div class="fignone" id="dds_02_0006__fig19701611163919"><span class="figcap"><b>Figure 10 </b>Connections</span><br><span><img id="dds_02_0006__image18971121117396" src="en-us_image_0000001143053813.png"></span></div>
</p></li><li id="dds_02_0006__li182324215276"><span>If the cluster instance is successfully connected, the page shown in <a href="#dds_02_0006__fig6991458155017">Figure 11</a> is displayed.</span><p><div class="fignone" id="dds_02_0006__fig6991458155017"><a name="dds_02_0006__fig6991458155017"></a><a name="fig6991458155017"></a><span class="figcap"><b>Figure 11 </b>Connection succeeded</span><br><span><img id="dds_02_0006__image39913585507" src="en-us_image_0000001142893865.png"></span></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0006__section1640311061419"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (SSL)</h4><div class="notice" id="dds_02_0006__note272454517159"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0006__p972574521516">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0006__ol1449614141415"><li id="dds_02_0006__li102171219141112"><span>On the <strong id="dds_02_0006__b232443839">Instance Management</strong> page, click the target DB instance.</span></li><li id="dds_02_0006__li115474615474"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0006__uicontrol1151654416310"><b>Connections</b></span>.</span></li><li id="dds_02_0006__li6501114181414"><span>In the <strong id="dds_02_0006__b159195461736">Basic Information</strong> area, click <span><img id="dds_02_0006__image18459281105" src="en-us_image_0000001096453856.png"></span> next to the <strong id="dds_02_0006__b129201546334">SSL</strong> field.</span></li><li id="dds_02_0006__li1651151451420"><span>Upload the root certificate to the <span id="dds_02_0006__text710881655312">ECS</span><span id="dds_02_0006__text310913166530"></span> to be connected to the DB instance.</span><p><p id="dds_02_0006__p11711919273">The following describes how to upload the certificate to a Linux and Window ECS:</p>
<ul id="dds_02_0006__ul2257181223115"><li id="dds_02_0006__li72571612113119">In Linux, run the following command:<div class="p" id="dds_02_0006__p0511314141410"><a name="dds_02_0006__li72571612113119"></a><a name="li72571612113119"></a><strong id="dds_02_0006__b11512149148">scp</strong> <em id="dds_02_0006__i135111141141">&lt;IDENTITY_FILE&gt;</em> <em id="dds_02_0006__i551114101418">&lt;REMOTE_USER&gt;</em><strong id="dds_02_0006__b1551191481416">@</strong><em id="dds_02_0006__i1952161481417">&lt;REMOTE_ADDRESS&gt;</em><strong id="dds_02_0006__b752191410143">:</strong><em id="dds_02_0006__i152131421417">&lt;REMOTE_DIR&gt;</em><div class="note" id="dds_02_0006__note352114161418"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0006__ul1652151441418"><li id="dds_02_0006__li1152214181418"><strong id="dds_02_0006__b15235222142511">IDENTITY_FILE</strong> indicates the directory where the root certificate resides. The file access permission is 600.</li><li id="dds_02_0006__li1852214151413"><strong id="dds_02_0006__b37266185114">REMOTE_USER</strong> indicates the <span id="dds_02_0006__text772352365313">ECS</span><span id="dds_02_0006__text127234238534"></span> OS user.</li><li id="dds_02_0006__li9539147144"><strong id="dds_02_0006__b18617372512">REMOTE_ADDRESS</strong> indicates the <span id="dds_02_0006__text122141829165319">ECS</span><span id="dds_02_0006__text12214029175314"></span> address.</li><li id="dds_02_0006__li1853514121417"><strong id="dds_02_0006__b1540498105114">REMOTE_DIR</strong> indicates the directory of the <span id="dds_02_0006__text527623513535">ECS</span><span id="dds_02_0006__text17276435135310"></span> to which the root certificate is uploaded.</li></ul>
</div></div>
</div>
</li><li id="dds_02_0006__li1219622314318">In Windows, upload the root certificate using the remote connection tool.</li></ul>
</p></li><li id="dds_02_0006__li75412144149"><span>Connect to the DB instance in the directory where the MongoDB client is located.</span><p><ul id="dds_02_0006__ul055614201419"><li id="dds_02_0006__li655191441415">Method 1: Using standard parameters<p id="dds_02_0006__p755181416143"><a name="dds_02_0006__li655191441415"></a><a name="li655191441415"></a><strong id="dds_02_0006__b955191421416">mongo --host</strong> &lt;<em id="dds_02_0006__i655171451417">DB_HOST</em>&gt; <strong id="dds_02_0006__b355201471418">--port</strong> &lt;<em id="dds_02_0006__i12551814171410">DB_PORT</em>&gt; <strong id="dds_02_0006__b6551714131412">-u</strong> &lt;<em id="dds_02_0006__i1255101410145">DB_USER</em>&gt; <strong id="dds_02_0006__b20555146148">-p</strong> <strong id="dds_02_0006__b85521411146">--authenticationDatabase</strong><strong id="dds_02_0006__b175541431416"> admin</strong> <strong id="dds_02_0006__b12554146146">--ssl --sslCAFile</strong> &lt;<em id="dds_02_0006__i155515143145">FILE_PATH</em>&gt; <strong id="dds_02_0006__b7551914121411">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0006__p9553141147">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0006__screen1055614111419">Enter password:</pre>
</li><li id="dds_02_0006__li1055161412145">Method 2: Using standard URI format<p id="dds_02_0006__p356111491415"><a name="dds_02_0006__li1055161412145"></a><a name="li1055161412145"></a><strong id="dds_02_0006__b756121413144">mong</strong><strong id="dds_02_0006__b185610147147">o m</strong><strong id="dds_02_0006__b15561314181417">ongodb://rwuser:&lt;password&gt;@</strong><em id="dds_02_0006__i556111411147">&lt;</em><em id="dds_02_0006__i55615142148">DB_HOST</em><em id="dds_02_0006__i1756161421419">&gt;</em><strong id="dds_02_0006__b9562147149">:</strong><em id="dds_02_0006__i95621441414">&lt;</em><em id="dds_02_0006__i75617141141">DB_PORT</em><em id="dds_02_0006__i35614141148">&gt;</em><strong id="dds_02_0006__b1757014181417">/test?authSource=admin</strong> <strong id="dds_02_0006__b115717144143">--ssl --sslCAFile</strong> <em id="dds_02_0006__i11571614161417">&lt;</em><em id="dds_02_0006__i65791441419">FILE_PATH</em><em id="dds_02_0006__i0577142141">&gt;</em> <strong id="dds_02_0006__b18571914191418">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0006__p796494819111">To obtain the public connection address, click the instance name and choose <strong id="dds_02_0006__b32711582325">Connections</strong>. The address is displayed in <strong id="dds_02_0006__b102865853216">Public Network Connection Address</strong> field on the <strong id="dds_02_0006__b1430758163216">Public Connection</strong> tab.</p>
</li></ul>
<div class="note" id="dds_02_0006__note1957314131416"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0006__ul115731415143"><li id="dds_02_0006__li202724443223">A cluster instance uses the management IP address to generate SSL certificate. <strong id="dds_02_0006__b10423558676">--sslAllowInvalidHostnames</strong> is needed for the SSL connection in a public network.</li><li id="dds_02_0006__li195814141146"><strong id="dds_02_0006__b44114619815">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0006__uicontrol141216615818"><b>EIP</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0006__uicontrol144146614813"><b>Connections</b></span> page.</li><li id="dds_02_0006__li195811411416"><strong id="dds_02_0006__b15599163211126">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0006__uicontrol75991632191219"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0006__uicontrol186012324128"><b>Basic Information</b></span> area on the <strong id="dds_02_0006__b166011732121214">Connections</strong> page.</li><li id="dds_02_0006__li36511042181918"><strong id="dds_02_0006__b18532857121920">DB_HOST </strong>and <strong id="dds_02_0006__b107471312192014">DB_PORT</strong> can also be obtained from the Node Information area on the Basic Information page.</li><li id="dds_02_0006__li15581214101417"><strong id="dds_02_0006__en-us_topic_0085335422_en-us_topic_0031147618_b84235270617104">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0006__en-us_topic_0085335422_b84235270619744">rwuser</strong>.</li><li id="dds_02_0006__li13293193711276"><strong id="dds_02_0006__b22939371275"><em id="dds_02_0006__i6293153712718">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0006__li122761750202211">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li><li id="dds_02_0006__li85813148148"><strong id="dds_02_0006__b916965975215">FILE_PATH</strong> indicates the path where the root certificate is stored.</li></ul>
</div></div>
<ul id="dds_02_0006__ul359171421411"><li id="dds_02_0006__li55921410140">Connect to the instance using standard parameters. The following is an example command:<p id="dds_02_0006__p6591714111417"><a name="dds_02_0006__li55921410140"></a><a name="li55921410140"></a><strong id="dds_02_0006__b659151461418">mongo --host 192.168.1.6 --port 8635 -u rwuser -p --authenticationDatabase admin --ssl --sslCAFile /tmp/ca.crt</strong> <strong id="dds_02_0006__b195901411141">--sslAllowInvalidHostnames</strong></p>
</li><li id="dds_02_0006__li1459914171415">Using standard URI format:<p id="dds_02_0006__p16591614111411"><a name="dds_02_0006__li1459914171415"></a><a name="li1459914171415"></a><strong id="dds_02_0006__b1459141417147">mong</strong><strong id="dds_02_0006__b45981420146">o</strong> <strong id="dds_02_0006__b16598147142">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0006__b959171417148"><strong id="dds_02_0006__b35911144141">192.168.1.80</strong>:8635</strong><strong id="dds_02_0006__b3591514141418">/test?authSource=admin</strong> <strong id="dds_02_0006__b95919148149"><strong id="dds_02_0006__b3591314121410">--ssl --sslCAFile /tmp/ca.crt</strong> <strong id="dds_02_0006__b4598147141">--sslAllowInvalidHostnames</strong></strong></p>
</li></ul>
</p></li><li id="dds_02_0006__li1759181417146"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><pre class="screen" id="dds_02_0006__screen45941411148">mongos&gt;</pre>
</p></li></ol>
</div>
<div class="section" id="dds_02_0006__section251495025819"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (Non-SSL)</h4><div class="notice" id="dds_02_0006__note45712120182235"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0006__p199631641205015">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0006__o12386b3d9147482881ddfdfd9a3f787c"><li id="dds_02_0006__lf50bb4c0b07747cfac89f74cc2b28b4a"><span>Connect to the <span class="keyword" id="dds_02_0006__keyword1648834318393">DB instance</span> in the directory where the MongoDB client is located.</span><p><ul id="dds_02_0006__ul112299368496"><li id="dds_02_0006__li16229133611496">Method 1: Using standard parameters<p id="dds_02_0006__p11432103844913"><a name="dds_02_0006__li16229133611496"></a><a name="li16229133611496"></a><strong id="dds_02_0006__b11229143604915">mongo --host</strong> &lt;<em id="dds_02_0006__i1229636144920">DB_HOST</em>&gt; <strong id="dds_02_0006__b3229036134914">--port</strong> &lt;<em id="dds_02_0006__i82299361491">DB_PORT</em>&gt; <strong id="dds_02_0006__b422923684918">-u</strong> &lt;<em id="dds_02_0006__i162293362492">DB_USER</em>&gt; <strong id="dds_02_0006__b66251283208">-p</strong> <strong id="dds_02_0006__b1522933611494">--authenticationDatabase</strong> <strong id="dds_02_0006__b71541216152018">admin</strong></p>
<p id="dds_02_0006__p9369153711551">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0006__screen9370437195515">Enter password:</pre>
</li><li id="dds_02_0006__li122297367491"><a name="dds_02_0006__li122297367491"></a><a name="li122297367491"></a>Method 2: Using standard URI format<p id="dds_02_0006__p1861164210158"><a name="dds_02_0006__li122297367491"></a><a name="li122297367491"></a><strong id="dds_02_0006__b090483712147">./mongo</strong> <strong id="dds_02_0006__b3904123701413">mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0006__b1390853716141">@</strong><em id="dds_02_0006__i479292405917"><em id="dds_02_0006__i7792224185910">&lt;</em><em id="dds_02_0006__i19792152416599">DB_HOST</em><em id="dds_02_0006__i379210249592">&gt;</em></em><strong id="dds_02_0006__b137474463169">:</strong><em id="dds_02_0006__i117451646121616"><em id="dds_02_0006__i77451246191619">&lt;</em><em id="dds_02_0006__i57456464163">DB_PORT</em><em id="dds_02_0006__i17745124617164">&gt;</em></em><strong id="dds_02_0006__b4923173721411">/test?authSource=admin</strong></p>
<p id="dds_02_0006__p1883182413465">To obtain the public connection address, click the instance name and choose <strong id="dds_02_0006__b13384145173313">Connections</strong>. The address is displayed in <strong id="dds_02_0006__b163851958339">Public Network Connection Address</strong> field on the <strong id="dds_02_0006__b13385175133320">Public Connection</strong> tab.</p>
</li></ul>
<div class="note" id="dds_02_0006__note21381431122218"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0006__ul18138931152220"><li id="dds_02_0006__li1739205145618"><strong id="dds_02_0006__b25111713141518">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0006__uicontrol25131113151518"><b>EIP</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0006__uicontrol151521311158"><b>Connections</b></span> page.</li><li id="dds_02_0006__li9743125175616"><strong id="dds_02_0006__b1992827111510">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0006__uicontrol169296711158"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0006__uicontrol393017701518"><b>Basic Information</b></span> area on the <strong id="dds_02_0006__b12930197141517">Connections</strong> page.</li><li id="dds_02_0006__li0327219102414"><strong id="dds_02_0006__b3758220152415">DB_HOST </strong>and <strong id="dds_02_0006__b13758620142419">DB_PORT</strong> can also be obtained from the <strong id="dds_02_0006__b126865915018">Node Information</strong> area on the <strong id="dds_02_0006__b192933140508">Basic Information</strong> page.</li><li id="dds_02_0006__li10747135112566"><strong id="dds_02_0006__b131991645181617">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0006__b1820074521617">rwuser</strong>.</li><li id="dds_02_0006__li142857152816"><strong id="dds_02_0006__b14436577285"><em id="dds_02_0006__i2431357192812">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0006__li9331125618610">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li></ul>
</div></div>
<ul id="dds_02_0006__ul3126111216496"><li id="dds_02_0006__li1212621264913">Connect to the instance using standard parameters. The following is an example command:<p id="dds_02_0006__p2941715144919"><a name="dds_02_0006__li1212621264913"></a><a name="li1212621264913"></a><strong id="dds_02_0006__b8126191215496">mongo --host 192.168.1.6 --port 8635 -u rwuser -p --authenticationDatabase admin</strong></p>
</li><li id="dds_02_0006__li212631204914">Using standard URI format:<p id="dds_02_0006__p860711719493"><a name="dds_02_0006__li212631204914"></a><a name="li212631204914"></a><strong id="dds_02_0006__b61933300202">mongo</strong> <strong id="dds_02_0006__b111261612134918">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0006__b1812641210496"><strong id="dds_02_0006__b12628151620110">192.168.1.80</strong>:8635</strong><strong id="dds_02_0006__b71261212174919">/test?authSource=admin</strong></p>
</li></ul>
</p></li><li id="dds_02_0006__li2356085813016"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><pre class="screen" id="dds_02_0006__screen430918289155">mongos&gt;</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0009.html">Connecting to a Cluster Instance</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0013.html">Connecting to a Cluster Instance Over Public Networks</a></div>
</div>
</div>

View File

@ -1,21 +0,0 @@
<a name="dds_02_0007"></a><a name="dds_02_0007"></a>
<h1 class="topictitle1">Enabling or Disabling SSL</h1>
<div id="body1511603910214"><div class="section" id="dds_02_0007__section4282820218710"><h4 class="sectiontitle"><strong id="dds_02_0007__b84235270694112">Scenarios</strong></h4><p id="dds_02_0007__p1784719017443"><span id="dds_02_0007__text198478084416">DDS</span> allows you to use SSL to encrypt connections to a DB instance to protect your data.</p>
<ul id="dds_02_0007__ul76031313134419"><li id="dds_02_0007__li13603141324418">If SSL is enabled, you can connect to a database using SSL. For details, see <a href="en-us_topic_0044018334.html#en-us_topic_0044018334__section1640311061419">SSL Connection</a>.</li><li id="dds_02_0007__li260341314446">If SSL is disabled, you can connect to the database using a common connection. For details, see <a href="en-us_topic_0044018334.html#en-us_topic_0044018334__sfc3bfb212a8440799f49320d91fc096c">Common Connection</a>.</li></ul>
<div class="notice" id="dds_02_0007__note31049471182749"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0007__p11009784182749">Enabling or disabling SSL will cause DB instance restart. Exercise caution when you perform this operation.</p>
</div></div>
</div>
<div class="section" id="dds_02_0007__section135517584317"><h4 class="sectiontitle">Enabling SSL</h4><ol id="dds_02_0007__en-us_topic_0085468614_en-us_topic_0049044698_ol36506495172844"><li id="dds_02_0007__en-us_topic_0085468614_en-us_topic_0049044698_li61161897172844"><span>On the <strong id="dds_02_0007__en-us_topic_0085468614_b1395510445455">Instance Management</strong> page, click the target DB instance.</span></li><li id="dds_02_0007__en-us_topic_0085468614_li576685910510"><span>In the <strong id="dds_02_0007__en-us_topic_0085468614_b1929598181">DB Information</strong> area on the <strong id="dds_02_0007__en-us_topic_0085468614_b67196116198">Basic Information</strong> page, click <span><img id="dds_02_0007__en-us_topic_0085468614_image1847961425415" src="en-us_image_0271492125.png"></span> to enable SSL in the <strong id="dds_02_0007__en-us_topic_0085468614_b06371111912">SSL</strong> field.</span><p><p id="dds_02_0007__en-us_topic_0085468614_p12275153529">Alternatively, in the navigation pane on the left, choose <strong id="dds_02_0007__en-us_topic_0085468614_b1846159103217">Connections</strong>. In the <strong id="dds_02_0007__en-us_topic_0085468614_b2244257162410">Basic Information</strong> area, click <span><img id="dds_02_0007__en-us_topic_0085468614_image109241039174016" src="en-us_image_0269983210.png"></span> next to the <strong id="dds_02_0007__en-us_topic_0085468614_b1824625782413">SSL</strong> field.</p>
</p></li><li id="dds_02_0007__en-us_topic_0085468614_li6565827163611"><span>In the displayed dialog box, click <strong id="dds_02_0007__en-us_topic_0085468614_b842352706113027">Yes</strong>.</span></li><li id="dds_02_0007__en-us_topic_0085468614_li8198418174048"><span>In the <span class="uicontrol" id="dds_02_0007__en-us_topic_0085468614_uicontrol97835057310161"><b>Basic Information</b></span> area, view the modification result.</span></li></ol>
</div>
<div class="section" id="dds_02_0007__section10934168947"><a name="dds_02_0007__section10934168947"></a><a name="section10934168947"></a><h4 class="sectiontitle">Disabling SSL</h4><ol id="dds_02_0007__en-us_topic_0085468614_ol17873318277"><li id="dds_02_0007__en-us_topic_0085468614_li160859818277"><span>On the <strong id="dds_02_0007__en-us_topic_0085468614_b1372712531524">Instance Management</strong> page, click the target DB instance.</span></li><li id="dds_02_0007__en-us_topic_0085468614_li793217201703"><span>In the <strong id="dds_02_0007__en-us_topic_0085468614_b1686123112015">DB Information</strong> area on the <strong id="dds_02_0007__en-us_topic_0085468614_b166871931709">Basic Information</strong> page, click <span><img id="dds_02_0007__en-us_topic_0085468614_image996484913015" src="en-us_image_0271515223.png"></span> to enable SSL in the <strong id="dds_02_0007__en-us_topic_0085468614_b868818318018">SSL</strong> field.</span><p><p id="dds_02_0007__en-us_topic_0085468614_p199346205012">Alternatively, in the navigation pane on the left, choose <strong id="dds_02_0007__en-us_topic_0085468614_b1320310387015">Connections</strong>. In the <strong id="dds_02_0007__en-us_topic_0085468614_b626815411001">Basic Information</strong> area, click <span><img id="dds_02_0007__en-us_topic_0085468614_image3542175314013" src="en-us_image_0271515222.png"></span> next to the <strong id="dds_02_0007__en-us_topic_0085468614_b726924110013">SSL</strong> field.</p>
</p></li><li id="dds_02_0007__en-us_topic_0085468614_li758519119381"><span>In the displayed dialog box, click <strong id="dds_02_0007__en-us_topic_0085468614_b1290823424">Yes</strong>.</span></li><li id="dds_02_0007__en-us_topic_0085468614_li34492814174353"><span>In the <span class="uicontrol" id="dds_02_0007__en-us_topic_0085468614_uicontrol97611957203612"><b>Basic Information</b></span> area, view the modification result.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0009.html">Connecting to a Cluster Instance</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,16 @@
<a name="dds_02_0009"></a><a name="dds_02_0009"></a>
<h1 class="topictitle1">Connecting to a Cluster Instance</h1>
<div id="body1522808547321"><p id="dds_02_0009__p8060118"></p>
</div>
<h1 class="topictitle1">Connecting to a Cluster Instance Over Private Networks</h1>
<div id="body1576650432772"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dds_02_0006.html">Binding and Unbinding an EIP</a></strong><br>
<li class="ulchildlink"><strong><a href="dds_02_0010.html">Overview</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_02_0007.html">Enabling or Disabling SSL</a></strong><br>
<li class="ulchildlink"><strong><a href="en-us_topic_0044018333.html">Creating a Cluster Instance</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="en-us_topic_0044018334.html">Connecting to a DB Instance Through a Client</a></strong><br>
<li class="ulchildlink"><strong><a href="dds_02_0022.html">Setting a Security Group</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="en-us_topic_0044018334.html">Connecting to a Cluster Instance Over Private Networks</a></strong><br>
</li>
</ul>

View File

@ -1,17 +1,15 @@
<a name="dds_02_0010"></a><a name="dds_02_0010"></a>
<h1 class="topictitle1">Service Process</h1>
<div id="body1522808547322"><p id="dds_02_0010__p8514761141515">This section describes how to create a replica set instance, set a security group, and connect to a replica set instance.</p>
<div class="section" id="dds_02_0010__en-us_topic_0105284935_section15744754141943"><h4 class="sectiontitle">Intended Audience</h4><ul id="dds_02_0010__en-us_topic_0105284935_ul3823213891623"><li id="dds_02_0010__en-us_topic_0105284935_li3530047291644">Users who create the DDS DB instance for the first time.</li><li id="dds_02_0010__en-us_topic_0105284935_li5410008191623">Users who need to perform the initial configuration after a DB instance is created.</li><li id="dds_02_0010__en-us_topic_0105284935_li2821380891638">Users who want to know how to connect to the DDS DB instances.</li></ul>
<h1 class="topictitle1">Overview</h1>
<div id="body1522808547321"><div class="section" id="dds_02_0010__section199871852182318"><h4 class="sectiontitle"><strong id="dds_02_0010__b186231134141220">Scenarios</strong></h4><p id="dds_02_0010__p8514761141515">This section describes how to create a cluster instance on the management console, set a security group, and connect to a cluster instance over private networks.</p>
</div>
<div class="section" id="dds_02_0010__en-us_topic_0105284935_section10506471114332"><h4 class="sectiontitle">Service Process</h4><p id="dds_02_0010__en-us_topic_0105284935_p18714184141515">The following describes the steps from creating a DB instance to using it.</p>
<div class="fignone" id="dds_02_0010__fig14600442174220"><span class="figcap"><b>Figure 1 </b>Accessing DB instances from a public network</span><br><span><img id="dds_02_0010__image12600174216429" src="en-us_image_0284274974.png"></span></div>
<div class="fignone" id="dds_02_0010__fig3595181794311"><span class="figcap"><b>Figure 2 </b>Accessing DB instances from a private network</span><br><span><img id="dds_02_0010__image15595517174313" src="en-us_image_0284275043.png"></span></div>
<div class="section" id="dds_02_0010__section10506471114332"><h4 class="sectiontitle">Process</h4><p id="dds_02_0010__p18714184141515">The following describes the steps from creating a DB instance to using it.</p>
<div class="fignone" id="dds_02_0010__fig622427152416"><span class="figcap"><b>Figure 1 </b>Accessing DB instances from a private network</span><br><span><img id="dds_02_0010__image422447152412" src="en-us_image_0000001143053843.png"></span></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_replica_set.html">Getting Started with Replica Sets</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0009.html">Connecting to a Cluster Instance Over Private Networks</a></div>
</div>
</div>

View File

@ -1,65 +0,0 @@
<a name="dds_02_0011"></a><a name="dds_02_0011"></a>
<h1 class="topictitle1">Restrictions</h1>
<div id="body1522808547322"><p id="dds_02_0011__en-us_topic_0105284934_p48042784123325">To improve the stability and security of DB instances, there are some restrictions on the use of DDS. For details, see <a href="#dds_02_0011__en-us_topic_0105284934_table60364850123535">Table 1</a>.</p>
<div class="tablenoborder"><a name="dds_02_0011__en-us_topic_0105284934_table60364850123535"></a><a name="en-us_topic_0105284934_table60364850123535"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_02_0011__en-us_topic_0105284934_table60364850123535" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Function restrictions</caption><thead align="left"><tr id="dds_02_0011__en-us_topic_0105284934_row63835418123535"><th align="left" class="cellrowborder" valign="top" width="27.26%" id="mcps1.3.2.2.3.1.1"><p id="dds_02_0011__en-us_topic_0105284934_p3286360123535"><strong id="dds_02_0011__en-us_topic_0105284934_b29577244123535">Operation</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="72.74000000000001%" id="mcps1.3.2.2.3.1.2"><p id="dds_02_0011__en-us_topic_0105284934_p46946588123535"><strong id="dds_02_0011__en-us_topic_0105284934_b842352706171539">Restrictions</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dds_02_0011__en-us_topic_0105284934_row65651390123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__en-us_topic_0105284934_p16162334123535">Connecting to a DB instance through a client</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><ul id="dds_02_0011__en-us_topic_0105284934_ul53814073144559"><li id="dds_02_0011__en-us_topic_0105284934_li109347144559">To access a <span class="keyword" id="dds_02_0011__keyword375831017484">DDS DB instance</span> which is not publicly accessible from an ECS, the instance must be in the same VPC subnet as the ECS.</li><li id="dds_02_0011__en-us_topic_0105284934_li46337654144559">By default, DDS cannot be accessed through an ECS in a different security group. You need to add an inbound rule to the DDS security group.</li><li id="dds_02_0011__en-us_topic_0105284934_li29581666144559">The default DDS port number is 8635. You can change it if you want to access DDS through another port.</li></ul>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row53074217123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__en-us_topic_0105284934_p4044355123535">Deployment</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__en-us_topic_0105284934_p41829298123535">ECSs in which DB instances are deployed are not visible to you. Your applications can access the database only through an IP address and port.</p>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row60017787123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__en-us_topic_0105284934_p29602599123535">Obtaining permissions of user <strong id="dds_02_0011__en-us_topic_0105284934_b84235270617431">rwuser</strong></p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__en-us_topic_0105284934_p19341371123535">Only the <strong id="dds_02_0011__en-us_topic_0105284934_b84235270694322">rwuser</strong> user permissions are provided on the instance creation page.</p>
<p id="dds_02_0011__p1716401218589">For details about the related commands, see <a href="dds_faq_0033.html">Which Commands are Supported or Restricted by DDS?</a></p>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row62985361123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__p1540641123535">Setting database parameters</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__p3859309423"></p>
<p id="dds_02_0011__p159333074217"></p>
<p id="dds_02_0011__p109814306422">Most database parameters in the parameter groups you created can be modified. For details, see section <a href="en-us_topic_configuration.html">Editing a Parameter Group</a>.</p>
<p id="dds_02_0011__p51021730164220"></p>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row19812839123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__en-us_topic_0105284934_p61336152123535">Migrating data</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__p52021072133834">You can use command line tools, including mongoexport and mongoimport, to migrate data. For details, see section <a href="dds_03_0052.html">Migrating Data</a>.</p>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row18357798134159"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__en-us_topic_0105284934_p255375813428">Storage engine</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__en-us_topic_0105284934_p2528698134215">Currently, DDS supports the WiredTiger storage engine only.</p>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row43544108123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__en-us_topic_0105284934_p37411822123535">Restarting a DB instance or a node</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__en-us_topic_0105284934_p41132837123535">A DDS DB instance must be restarted on the DDS console.</p>
</td>
</tr>
<tr id="dds_02_0011__en-us_topic_0105284934_row27804808123535"><td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.2.2.3.1.1 "><p id="dds_02_0011__p37597003123535">Viewing DDS backup files</p>
</td>
<td class="cellrowborder" valign="top" width="72.74000000000001%" headers="mcps1.3.2.2.3.1.2 "><p id="dds_02_0011__p63693518173">You can download and view the backup files on the DDS console. For details, see section <a href="en-us_topic_backup_download.html">Downloading Backup Files</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_replica_set.html">Getting Started with Replica Sets</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +1,24 @@
<a name="dds_02_0013"></a><a name="dds_02_0013"></a>
<h1 class="topictitle1">Setting a Security Group </h1>
<div id="body1522808547322"><div class="section" id="dds_02_0013__en-us_topic_0105284937_section3152058916230"><h4 class="sectiontitle"><strong id="dds_02_0013__b6455183611343">Scenarios</strong></h4><p id="dds_02_0013__en-us_topic_0105284937_p43222116204125">This section guides you on how to add a security group rule to control access from and to <span class="keyword" id="dds_02_0013__keyword67053543120">DDS DB instances</span> in a security group. This document describes how to set security groups.</p>
</div>
<div class="section" id="dds_02_0013__en-us_topic_0105284937_section1282916720425"><h4 class="sectiontitle">Background Information</h4><p id="dds_02_0013__en-us_topic_0105284937_p27630095204125">You can access a DDS DB instance in either of the following ways:</p>
<ul id="dds_02_0013__en-us_topic_0105284937_ul47344269204125"><li id="dds_02_0013__en-us_topic_0105284937_li23445242204125">Public network</li><li id="dds_02_0013__en-us_topic_0105284937_li10720689204125">Internal network</li></ul>
</div>
<div class="section" id="dds_02_0013__en-us_topic_0105284937_section14550984204232"><h4 class="sectiontitle">Precautions</h4><p id="dds_02_0013__en-us_topic_0105284937_p5854544204125">The default security group rule allows all outgoing data packets. ECSs and DDS DB instances can access each other in the same security group. After a security group is created, you can add security group rules to control the access from and to the DDS DB instances in the security group.</p>
<p id="dds_02_0013__en-us_topic_0105284937_p1012315204125">By default, a tenant can create a maximum of 500 security group rules. An excessive number of security group rules increases the network latency of the first packet. It is recommended that you add a maximum of 50 rules for each security group.</p>
<p id="dds_02_0013__en-us_topic_0105284937_p41200900204125">To access the DDS DB instances in a security group from external resources, create an inbound rule for the security group.</p>
</div>
<div class="section" id="dds_02_0013__en-us_topic_0105284937_section25078651204428"><h4 class="sectiontitle"><strong id="dds_02_0013__b15424473204153">Procedure</strong></h4><ol id="dds_02_0013__en-us_topic_0105284937_ol49383781586"><li id="dds_02_0013__en-us_topic_0105284937_li93899141586"><span>Log in to the management console.</span></li><li id="dds_02_0013__en-us_topic_0105284937_li1870917810588"><span>Click <span><img id="dds_02_0013__en-us_topic_0105284937_image070916845819" src="en-us_image_0284275018.png"></span> in the upper left corner and select a region and project.</span></li><li id="dds_02_0013__en-us_topic_0105284937_li297543615857"><span>Click <strong id="dds_02_0013__b1252154513410">Service List</strong>. Under <strong id="dds_02_0013__b125334514414">Network</strong>, click <strong id="dds_02_0013__b125554554120">Virtual Private Cloud</strong>.</span></li><li id="dds_02_0013__en-us_topic_0105284937_li3171015115916"><span>In the navigation pane on the left, choose <strong id="dds_02_0013__b1947515014118">Access Control</strong> &gt; <strong id="dds_02_0013__b204771850144115">Security Groups</strong>.</span></li><li id="dds_02_0013__en-us_topic_0105284937_li140569415930"><span>On the <strong id="dds_02_0013__b14671315174216">Security Group</strong> page, click the security group name.</span></li><li id="dds_02_0013__en-us_topic_0105284937_li5489049115946"><span>On the <strong id="dds_02_0013__b19546171814217">Inbound Rules</strong> tab, click <strong id="dds_02_0013__b1354831820421">Add Rule</strong>. In the displayed <strong id="dds_02_0013__b13549111811426">Add Inbound Rule</strong> dialog box, set required parameters to add inbound rules. On the <strong id="dds_02_0013__b17816182834210">Outbound Rules</strong> tab, click <strong id="dds_02_0013__b4819152854214">Add Rule</strong>. In the displayed <strong id="dds_02_0013__b082652894213">Add Outbound Rule</strong> dialog box, set required parameters to add outbound rules.</span></li><li id="dds_02_0013__en-us_topic_0105284937_li6900819151212"><span>Add a security group rule as prompted.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_table532116198213" width="90%" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_row731911191722"><th align="left" class="cellrowborder" valign="top" width="13.04%" id="mcps1.3.4.2.7.2.1.2.4.1.1"><p id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_p17319119020"><strong id="dds_02_0013__b158649370431">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.96%" id="mcps1.3.4.2.7.2.1.2.4.1.2"><p id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_p431911191622"><strong id="dds_02_0013__b1047363994313">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.2.7.2.1.2.4.1.3"><p id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_p103191119621"><strong id="dds_02_0013__b17051140144319">Value Example</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_row8320419723"><td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.4.2.7.2.1.2.4.1.1 "><p id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_p1432013199214">Protocol</p>
</td>
<td class="cellrowborder" valign="top" width="68.96%" headers="mcps1.3.4.2.7.2.1.2.4.1.2 "><p id="dds_02_0013__en-us_topic_0118534005_p432017191726">Specifies the network protocol. Allows all traffic or supports user-defined protocols, TCP, UDP, ICMP, and SSH.</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.7.2.1.2.4.1.3 "><p id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_p1332014191216">TCP</p>
</td>
</tr>
<tr id="dds_02_0013__en-us_topic_0105284937_row15380125810476"><td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.4.2.7.2.1.2.4.1.1 "><p id="dds_02_0013__en-us_topic_0105284937_p1538118582479">Port</p>
</td>
<td class="cellrowborder" valign="top" width="68.96%" headers="mcps1.3.4.2.7.2.1.2.4.1.2 "><p id="dds_02_0013__en-us_topic_0105284937_p1391312104488">Specifies the port allowing the access to ECSs or external devices. </p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.7.2.1.2.4.1.3 "><p id="dds_02_0013__en-us_topic_0105284937_p1438118583479">8635</p>
</td>
</tr>
<tr id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_row1732101910217"><td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.4.2.7.2.1.2.4.1.1 "><p id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_p16320131918211">Source/Destination</p>
</td>
<td class="cellrowborder" valign="top" width="68.96%" headers="mcps1.3.4.2.7.2.1.2.4.1.2 "><p id="dds_02_0013__en-us_topic_0105284937_p1953711281854">Specifies the supported IP address and security group.</p>
<ul id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_ul474117187016"><li id="dds_02_0013__en-us_topic_0105284937_li204213179474"><strong id="dds_02_0013__b6421166468">IP address</strong>: indicates that the security group rule takes effect in a specified IP address range.<ul id="dds_02_0013__en-us_topic_0105284937_ul67881445105111"><li id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_li87410184011">xxx.xxx.xxx.xxx/32 (IPv4)</li><li id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_li1374113189012">xxx.xxx.xxx.0/24 (subnet)</li><li id="dds_02_0013__en-us_topic_0105284937_en-us_topic_0118534005_li167411218306">0.0.0.0/0 (any IP address)</li></ul>
</li><li id="dds_02_0013__en-us_topic_0105284937_li1390210401514"><strong id="dds_02_0013__b122046167469">Security group</strong>: indicates that this rule allows all IP addresses of ECSs to access DDS DB instances in the same specified security group.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.7.2.1.2.4.1.3 "><ul id="dds_02_0013__en-us_topic_0105284937_ul209321608538"><li id="dds_02_0013__en-us_topic_0105284937_li119329015535">192.168.10.0/24</li><li id="dds_02_0013__en-us_topic_0105284937_li209327055311">default</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="dds_02_0013__en-us_topic_0105284937_li21369327151121"><span>Click <strong id="dds_02_0013__b842352706113845">OK</strong>.</span></li></ol>
</div>
<h1 class="topictitle1">Connecting to a Cluster Instance Over Public Networks</h1>
<div id="body1576650432772"><p id="dds_02_0013__p8060118"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dds_02_0014.html">Overview</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_02_0016.html">Creating a Cluster Instance</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_02_0046.html">Binding an EIP</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_02_0019.html">Setting a Security Group</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_02_0006.html">Connecting to a Cluster Instance Over Public Networks</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_replica_set.html">Getting Started with Replica Sets</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_cluster.html">Getting Started with Clusters</a></div>
</div>
</div>

View File

@ -1,20 +1,15 @@
<a name="dds_02_0014"></a><a name="dds_02_0014"></a>
<h1 class="topictitle1">Connecting to a Replica Set Instance</h1>
<div id="body1522808547322"><p id="dds_02_0014__p8060118"></p>
<h1 class="topictitle1">Overview</h1>
<div id="body1576650432772"><div class="section" id="dds_02_0014__section185756295353"><h4 class="sectiontitle"><strong id="dds_02_0014__b71502398816">Scenarios</strong></h4><p id="dds_02_0014__en-us_topic_0105284935_p8514761141515">This section describes how to create a cluster instance on the management console, set a security group, bind an EIP, and connect to a cluster instance over public networks.</p>
</div>
<div class="section" id="dds_02_0014__en-us_topic_0105284935_section10506471114332"><h4 class="sectiontitle">Process</h4><p id="dds_02_0014__en-us_topic_0105284935_p18714184141515">The following describes the steps from creating a DB instance to using it.</p>
<div class="fignone" id="dds_02_0014__en-us_topic_0105284935_fig34101010182111"><span class="figcap"><b>Figure 1 </b>Accessing DB instances from a public network</span><br><span><img id="dds_02_0014__en-us_topic_0105284935_image1841001014216" src="en-us_image_0000001142773901.png"></span></div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dds_02_0015.html">Binding and Unbinding an EIP</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dds_02_0016.html">Enabling or Disabling SSL</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="en-us_topic_0105284966.html">Connecting to a DB Instance Through a Client</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_replica_set.html">Getting Started with Replica Sets</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0013.html">Connecting to a Cluster Instance Over Public Networks</a></div>
</div>
</div>

View File

@ -1,25 +0,0 @@
<a name="dds_02_0015"></a><a name="dds_02_0015"></a>
<h1 class="topictitle1">Binding and Unbinding an EIP</h1>
<div id="body1522328390777"><div class="section" id="dds_02_0015__section055104935914"><a name="dds_02_0015__section055104935914"></a><a name="section055104935914"></a><h4 class="sectiontitle"><strong id="dds_02_0015__b013651851316">Scenarios</strong></h4><p id="dds_02_0015__p6551149135917">You can access DDS through a private IP address or an EIP. The application scenario of the connection address is as follows:</p>
<ul id="dds_02_0015__ul115584945912"><li id="dds_02_0015__li14552049185915">Use a private IP address when:<p id="dds_02_0015__p12551049155916"><a name="dds_02_0015__li14552049185915"></a><a name="li14552049185915"></a>DDS provides a private IP address by default.</p>
<p id="dds_02_0015__p75510491599">Your applications are deployed on an ECS in a region where your replica set instance is located.</p>
</li></ul>
<ul id="dds_02_0015__ul1855449105913"><li id="dds_02_0015__li135514925912">Use an EIP when:<ul id="dds_02_0015__ul125516499595"><li id="dds_02_0015__li255104965916">Your applications are deployed on an ECS in a region separated from the region where your replica set instance is located.</li><li id="dds_02_0015__li65544917591">Your applications are deployed on another cloud platform.</li></ul>
</li></ul>
</div>
<div class="section" id="dds_02_0015__section1130510262514"><h4 class="sectiontitle">Precautions</h4><ul id="dds_02_0015__ul15712132844"><li id="dds_02_0015__li13712152748">Before accessing a database, you need to apply for an EIP on the VPC console. Then, add an inbound rule to allow the IP addresses or IP address ranges of ECSs. For details, see section <a href="dds_02_0013.html">Setting a Security Group</a>.</li><li id="dds_02_0015__li137122023418">In the replica set instance, only primary and secondary nodes can be bound to an EIP. To change the EIP that has been bound to a node, you need to unbind it from the node first.</li></ul>
</div>
<div class="section" id="dds_02_0015__section0350133891310"><a name="dds_02_0015__section0350133891310"></a><a name="section0350133891310"></a><h4 class="sectiontitle">Binding an EIP</h4><ol id="dds_02_0015__ol38264571203259"><li id="dds_02_0015__li8836821203259"><span>On the <strong id="dds_02_0015__b84235270615219">Instance Management</strong> page, click the target replica set instance.</span></li><li id="dds_02_0015__li349825362319"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0015__uicontrol87094403516"><b>Connections</b></span>. </span></li><li id="dds_02_0015__li44693916203259"><span>In the <span class="parmname" id="dds_02_0015__parmname769647905151058"><b>Basic Information</b></span> area, locate the target node and click <strong id="dds_02_0015__b842352706151152">Bind EIP</strong> in the <strong id="dds_02_0015__b84235270615126">Operation</strong> column.</span></li><li id="dds_02_0015__li63437472203259"><span>In the displayed dialog box, all EIPs in the unbound status are listed. Select the required EIP and click <strong id="dds_02_0015__b842352706204348">OK</strong>. If no available EIPs are displayed, click <span class="uicontrol" id="dds_02_0015__uicontrol7910157203259"><b>View EIP</b></span> and create an EIP on the VPC console.</span></li><li id="dds_02_0015__li4082557203259"><span>In the <strong id="dds_02_0015__b842352706105036">EIP</strong> column, check that the EIP is successfully bound.</span><p><p id="dds_02_0015__p23394266203259">To unbind an EIP from the DB instance, see <a href="#dds_02_0015__section142610351410">Unbinding an EIP</a>.</p>
</p></li></ol>
</div>
<div class="section" id="dds_02_0015__section142610351410"><a name="dds_02_0015__section142610351410"></a><a name="section142610351410"></a><h4 class="sectiontitle">Unbinding an EIP</h4><ol id="dds_02_0015__ol31276680102616"><li id="dds_02_0015__li35235350102616"><span>On the <strong id="dds_02_0015__b316210509">Instance Management</strong> page, click the replica set instance that has been bound with an EIP.</span></li><li id="dds_02_0015__li13636174313355"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0015__uicontrol8998202073619"><b>Connections</b></span>. </span></li><li id="dds_02_0015__li5185173121149"><span>In the <span class="parmname" id="dds_02_0015__parmname179551228193610"><b>Basic Information</b></span> area, locate the target node and click <strong id="dds_02_0015__b159552028193614">Unbind EIP</strong> in the <strong id="dds_02_0015__b995742811367">Operation</strong> column.</span></li><li id="dds_02_0015__li56439840102720"><span>In the displayed dialog box, click <strong id="dds_02_0015__b84235270695933">OK</strong> to unbind the EIP.</span><p><p id="dds_02_0015__p21771104103056">To bind an EIP to the DB instance again, see <a href="#dds_02_0015__section0350133891310">Binding an EIP</a>.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0014.html">Connecting to a Replica Set Instance</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
<a name="dds_02_0019"></a><a name="dds_02_0019"></a>
<h1 class="topictitle1">Setting a Security Group</h1>
<div id="body1522808547321"><div class="section" id="dds_02_0019__dds_02_0022_section3152058916230"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0019__dds_02_0022_p43222116204125">This section explains how to add a security group rule to control access to and from the <span class="keyword" id="dds_02_0019__dds_02_0022_keyword943913121715">DDS DB instances</span> associated with a security group.</p>
</div>
<div class="section" id="dds_02_0019__dds_02_0022_section14550984204232"><h4 class="sectiontitle">Precautions</h4><p id="dds_02_0019__dds_02_0022_p5854544204125">The default security group rule allows all outgoing data packets. <span id="dds_02_0019__dds_02_0022_text19411194672218">ECS</span><span id="dds_02_0019__dds_02_0022_text136741350172218"></span>s and DDS DB instances in the same security group can access each other. After a security group is created, you can create different rules for that security group, which allows you to control access to the DB instances that are in it.</p>
<p id="dds_02_0019__dds_02_0022_p41200900204125">To access a DB instance in a security group from a source outside of that group, you need to create an inbound rule.</p>
<p id="dds_02_0019__dds_02_0022_p1801181718287">For details about the constraints on using security groups, see "Security Group Overview" in the <em id="dds_02_0019__dds_02_0022_i16646101815819">Virtual Private Cloud User Guide</em>.</p>
</div>
<div class="section" id="dds_02_0019__dds_02_0022_section6250135215227"><h4 class="sectiontitle">Procedure</h4><p id="dds_02_0019__dds_02_0022_p1973013172619">For details about setting a security group, see "Adding a Security Group Rule" in the <em id="dds_02_0019__dds_02_0022_i633662820239">Virtual Private Cloud User Guide</em>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0013.html">Connecting to a Cluster Instance Over Public Networks</a></div>
</div>
</div>

View File

@ -0,0 +1,18 @@
<a name="dds_02_0022"></a><a name="dds_02_0022"></a>
<h1 class="topictitle1">Setting a Security Group</h1>
<div id="body1522808547321"><div class="section" id="dds_02_0022__section3152058916230"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0022__p43222116204125">This section explains how to add a security group rule to control access to and from the <span class="keyword" id="dds_02_0022__keyword943913121715">DDS DB instances</span> associated with a security group.</p>
</div>
<div class="section" id="dds_02_0022__section14550984204232"><h4 class="sectiontitle">Precautions</h4><p id="dds_02_0022__p5854544204125">The default security group rule allows all outgoing data packets. <span id="dds_02_0022__text19411194672218">ECS</span><span id="dds_02_0022__text136741350172218"></span>s and DDS DB instances in the same security group can access each other. After a security group is created, you can create different rules for that security group, which allows you to control access to the DB instances that are in it.</p>
<p id="dds_02_0022__p41200900204125">To access a DB instance in a security group from a source outside of that group, you need to create an inbound rule.</p>
<p id="dds_02_0022__p1801181718287">For details about the constraints on using security groups, see "Security Group Overview" in the <em id="dds_02_0022__i16646101815819">Virtual Private Cloud User Guide</em>.</p>
</div>
<div class="section" id="dds_02_0022__section6250135215227"><h4 class="sectiontitle">Procedure</h4><p id="dds_02_0022__p1973013172619">For details about setting a security group, see "Adding a Security Group Rule" in the <em id="dds_02_0022__i633662820239">Virtual Private Cloud User Guide</em>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0009.html">Connecting to a Cluster Instance Over Private Networks</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
<a name="dds_02_0024"></a><a name="dds_02_0024"></a>
<h1 class="topictitle1">Setting a Security Group</h1>
<div id="body1524559356643"><div class="section" id="dds_02_0024__en-us_topic_0105284937_section3152058916230"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0024__en-us_topic_0105284937_p43222116204125">This section guides you on how to add a security group rule to control access from and to <span class="keyword" id="dds_02_0024__en-us_topic_0105284937_keyword943913121715">DDS DB instances</span> in a security group.</p>
</div>
<div class="section" id="dds_02_0024__en-us_topic_0105284937_section14550984204232"><h4 class="sectiontitle">Precautions</h4><p id="dds_02_0024__en-us_topic_0105284937_p5854544204125">The default security group rule allows all outgoing data packets. <span id="dds_02_0024__text125341653152112">ECS</span><span id="dds_02_0024__text537615912111"></span>s and DDS DB instances in the same security group can access each other. After a security group is created, you can create different rules for that security group, which allows you to control access to the DB instances that are in it.</p>
<p id="dds_02_0024__en-us_topic_0105284937_p41200900204125">To access a DB instance in a security group from a source outside of that group, you need to create an inbound rule.</p>
<p id="dds_02_0024__p1801181718287">For details about the constraints on using security groups, see "Security Group Overview" in the <em id="dds_02_0024__i1856415292132">Virtual Private Cloud User Guide</em>.</p>
</div>
<div class="section" id="dds_02_0024__section6250135215227"><h4 class="sectiontitle">Procedure</h4><p id="dds_02_0024__p1973013172619">For details about setting a security group, see "Adding a Security Group Rule" in the <em id="dds_02_0024__i633662820239">Virtual Private Cloud User Guide</em>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0074.html">Connecting to a Single-Node Instance Over Private Networks</a></div>
</div>
</div>

View File

@ -0,0 +1,22 @@
<a name="dds_02_0026"></a><a name="dds_02_0026"></a>
<h1 class="topictitle1">Binding an EIP</h1>
<div id="body1524559356643"><div class="section" id="dds_02_0026__section055104935914"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0026__p171361239153218">After you create a DB instance, you can bind it to an <span id="dds_02_0026__text931951122515"></span><span id="dds_02_0026__text194552546256">EIP</span> to allow external access. If later you want to prohibit external access, you can also unbind the EIP from the DB instance.</p>
</div>
<div class="section" id="dds_02_0026__section26758795194119"><h4 class="sectiontitle">Precautions</h4><ul id="dds_02_0026__ul15712132844"><li id="dds_02_0026__li13712152748">Before accessing a database, you need to apply for an <span id="dds_02_0026__text549610410264"></span><span id="dds_02_0026__text0496744262">EIP</span> on the VPC console. Then, add an inbound rule to allow the IP addresses or IP address ranges of ECSs. For details, see section <a href="dds_02_0080.html">Setting a Security Group</a>.</li><li id="dds_02_0026__li137122023418">To change the <span id="dds_02_0026__text1584514513519"></span><span id="dds_02_0026__text168467585118">EIP</span> that has been bound to a node, you need to unbind it from the node first.</li></ul>
</div>
<div class="section" id="dds_02_0026__section3199593620428"><a name="dds_02_0026__section3199593620428"></a><a name="section3199593620428"></a><h4 class="sectiontitle">Binding an <span id="dds_02_0026__text1761717195114"></span><span id="dds_02_0026__text1375179514">EIP</span></h4><ol id="dds_02_0026__ol12603704105129"><li id="dds_02_0026__li46324476105129"><span>On the <strong id="dds_02_0026__b84235270615219">Instance Management</strong> page, click the target single node instance.</span></li><li id="dds_02_0026__li349825362319"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0026__uicontrol1289618282046"><b>Connections</b></span>.</span></li><li id="dds_02_0026__li38329011165953"><span>In the <strong id="dds_02_0026__b117916301841">Basic Information</strong> area, locate the target node and click <strong id="dds_02_0026__b879320307410">Bind EIP</strong> in the <strong id="dds_02_0026__b579313016419">Operation</strong> column.</span><p><p id="dds_02_0026__p156211543878">Or in the <strong id="dds_02_0026__b1519910114228">Node Information</strong> area on the <strong id="dds_02_0026__b16199813228">Basic Information</strong> page, locate the target node and choose <strong id="dds_02_0026__b20199101122210">More</strong> &gt; <strong id="dds_02_0026__b719918132213">Bind EIP</strong> in the <strong id="dds_02_0026__b1419916182212">Operation</strong> column.</p>
</p></li><li id="dds_02_0026__li14267104105129"><span>In the displayed dialog box, all available unbound EIPs are listed. Select the required <span id="dds_02_0026__text0404132216518"></span><span id="dds_02_0026__text16405132285113">EIP</span> and click <strong id="dds_02_0026__b1340615227518">OK</strong>. If no available EIPs are displayed, click <strong id="dds_02_0026__b38341124165114">View EIP</strong> and create an <span id="dds_02_0026__text15835224145118"></span><span id="dds_02_0026__text128361224195114">EIP</span> on the VPC console.</span></li><li id="dds_02_0026__li17560260102159"><span>Locate the target node, in the <strong id="dds_02_0026__b2020715324519">EIP</strong> column, view the <span id="dds_02_0026__text12332161417276"></span><span id="dds_02_0026__text19332191412279">EIP</span> that is successfully bound.</span><p><p id="dds_02_0026__p32760134103252">To unbind an EIP from the DB instance, see <a href="#dds_02_0026__section35191234134216">Unbinding an EIP</a>.</p>
</p></li></ol>
</div>
<div class="section" id="dds_02_0026__section35191234134216"><a name="dds_02_0026__section35191234134216"></a><a name="section35191234134216"></a><h4 class="sectiontitle">Unbinding an <span id="dds_02_0026__text963613272511"></span><span id="dds_02_0026__text6637122735114">EIP</span></h4><ol id="dds_02_0026__ol1441915615430"><li id="dds_02_0026__li1960835754320"><span>On the <strong id="dds_02_0026__b34027572411917">Instance Management</strong> page, click the target single node instance.</span></li><li id="dds_02_0026__li14898203864416"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0026__uicontrol117093408810"><b>Connections</b></span>.</span></li><li id="dds_02_0026__li725094674418"><span>In the <strong id="dds_02_0026__b161811243287">Basic Information</strong> area, locate the target node and click <strong id="dds_02_0026__b14182943887">Unbind EIP</strong> in the <strong id="dds_02_0026__b518314311818">Operation</strong> column.</span><p><p id="dds_02_0026__p3911161814814">Or in the <strong id="dds_02_0026__b16911171819818">Node Information</strong> area on the <strong id="dds_02_0026__b1491115181815">Basic Information</strong> page, locate the target node and choose <strong id="dds_02_0026__b7911121810811">More</strong> &gt; <strong id="dds_02_0026__b091171810815">Bind EIP</strong> in the <strong id="dds_02_0026__b1911171816817">Operation</strong> column.</p>
</p></li><li id="dds_02_0026__li24001256164416"><span>In the displayed dialog box, click <strong id="dds_02_0026__b1472131165218">Yes</strong>.</span><p><p id="dds_02_0026__p1440018568448">To bind an EIP to the DB instance again, see <a href="#dds_02_0026__section3199593620428">Binding an EIP</a>.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0077.html">Connecting to a Single Node Instance Over Public Networks</a></div>
</div>
</div>

View File

@ -0,0 +1,60 @@
<a name="dds_02_0028"></a><a name="dds_02_0028"></a>
<h1 class="topictitle1">Connecting to a Single Node Instance Over Private Networks</h1>
<div id="body1524559356644"><div class="section" id="dds_02_0028__en-us_topic_0085335422_section46429645141251"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0028__p125004821516">This section describes how to connect to a single-node instance using the MongoDB client over private networks.</p>
<p id="dds_02_0028__p1432214314142">The MongoDB client can connect to a DB instance with an unencrypted connection or an encrypted connection (SSL). To improve data transmission security, you are advised to connect to DB instances using the SSL connection.</p>
<p id="dds_02_0028__p293321134111"><strong id="dds_02_0028__b26861333143110">Different OS scenarios</strong>: Examples include Linux and Windows clients.</p>
</div>
<div class="section" id="dds_02_0028__section135810251275"><h4 class="sectiontitle">Constraints</h4><p id="dds_02_0028__p181210271492">For details about constraints on connecting to a single node instance, see <a href="dds_01_0022.html">Constraints and Recommendations</a>.</p>
</div>
<div class="section" id="dds_02_0028__en-us_topic_0085335422_section12950115493212"><h4 class="sectiontitle">Prerequisites</h4><ol id="dds_02_0028__ol134821154847"><li id="dds_02_0028__li1258020155214">For details on how to create and log in to an ECS, see "Creating and Logging In to a Windows ECS" or "Creating and Logging In to a Linux ECS" in the <em id="dds_02_0028__i853905914334">Elastic Cloud Server User Guide</em>.</li><li id="dds_02_0028__li155435381355">Install the MongoDB client on the <span id="dds_02_0028__text1888394782319">ECS</span><span id="dds_02_0028__text788320475236"></span>.<p id="dds_02_0028__p15162131654014">For details on how to install a MongoDB client, see <a href="dds_faq_0018.html">How Can I Install a MongoDB Client?</a></p>
</li></ol>
</div>
<div class="section" id="dds_02_0028__section17675112516136"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (SSL)</h4><div class="notice" id="dds_02_0028__note156751999513"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0028__p43820110157">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0028__ol9332173415137"><li id="dds_02_0028__li102171219141112"><span>On the <strong id="dds_02_0028__b15169284126">Instance Management</strong> page, click the target DB instance.</span></li><li id="dds_02_0028__li115474615474"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0028__uicontrol1256710303129"><b>Connections</b></span>.</span></li><li id="dds_02_0028__li6501114181414"><span>In the <strong id="dds_02_0028__b15255232101212">Basic Information</strong> area, click <span><img id="dds_02_0028__image18459281105" src="en-us_image_0000001142773955.png"></span> next to the <strong id="dds_02_0028__b82561832191210">SSL</strong> field.</span><p><div class="note" id="dds_02_0028__note1781903451510"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_02_0028__p436813619153">The certificate can also be downloaded from the Node Information area on the Basic Information page.</p>
</div></div>
</p></li><li id="dds_02_0028__li1433333418132"><span>Upload the root certificate to the <span id="dds_02_0028__text1079814510248">ECS</span><span id="dds_02_0028__text107986511246"></span> to be connected to the DB instance.</span><p><p id="dds_02_0028__p1933617718381">The following describes how to upload the certificate to a Linux and Window ECS:</p>
<ul id="dds_02_0028__ul1977195483815"><li id="dds_02_0028__li87711754113820">In Linux, run the following command:<div class="p" id="dds_02_0028__p333313461319"><a name="dds_02_0028__li87711754113820"></a><a name="li87711754113820"></a><strong id="dds_02_0028__b1733319342138">scp</strong> <em id="dds_02_0028__i3333034161319">&lt;IDENTITY_FILE&gt;</em> <em id="dds_02_0028__i8333173416130">&lt;REMOTE_USER&gt;</em><strong id="dds_02_0028__b93331334191317">@</strong><em id="dds_02_0028__i03331349135">&lt;REMOTE_ADDRESS&gt;</em><strong id="dds_02_0028__b5333103413136">:</strong><em id="dds_02_0028__i1933319340131">&lt;REMOTE_DIR&gt;</em><div class="note" id="dds_02_0028__note9333183415136"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0028__ul633473411138"><li id="dds_02_0028__li15334153461310"><strong id="dds_02_0028__b2448131512264">IDENTITY_FILE</strong> indicates the directory where the root certificate resides. The file access permission is 600.</li><li id="dds_02_0028__li3334734141318"><strong id="dds_02_0028__b174202195509">REMOTE_USER</strong> indicates the <span id="dds_02_0028__text1853161616245">ECS</span><span id="dds_02_0028__text105341615242"></span> OS user.</li><li id="dds_02_0028__li23345341134"><strong id="dds_02_0028__b1966412025013">REMOTE_ADDRESS</strong> indicates the <span id="dds_02_0028__text115042452411">ECS</span><span id="dds_02_0028__text1715013249245"></span> address.</li><li id="dds_02_0028__li13340345135"><strong id="dds_02_0028__b747952118508">REMOTE_DIR</strong> indicates the directory of the <span id="dds_02_0028__text1614253019249">ECS</span><span id="dds_02_0028__text10142163012247"></span> to which the root certificate is uploaded.</li></ul>
</div></div>
</div>
</li></ul>
<ul id="dds_02_0028__ul16741818193920"><li id="dds_02_0028__li067514182397">In Windows, upload the root certificate using the remote connection tool.</li></ul>
</p></li><li id="dds_02_0028__li13341346136"><span>Connect to a <span class="keyword" id="dds_02_0028__keyword35982035017">DDS DB instance</span>.</span><p><ul id="dds_02_0028__ul16334634151317"><li id="dds_02_0028__li5334103421319">Method 1: Using standard parameters<p id="dds_02_0028__p2334734121318"><a name="dds_02_0028__li5334103421319"></a><a name="li5334103421319"></a><strong id="dds_02_0028__b33351034111319">mongo --host</strong> &lt;<em id="dds_02_0028__i93351934161311">DB_HOST</em>&gt; <strong id="dds_02_0028__b6335203491317">--port</strong> &lt;<em id="dds_02_0028__i19335193412136">DB_PORT</em>&gt; <strong id="dds_02_0028__b16335193431315">-u</strong> &lt;<em id="dds_02_0028__i2335153491311">DB_USER</em>&gt; <strong id="dds_02_0028__b33351034111311">-p</strong> <strong id="dds_02_0028__b1733519349132">--authenticationDatabase</strong><strong id="dds_02_0028__b5335183451315"> admin </strong><strong id="dds_02_0028__b333514342138">--ssl --sslCAFile</strong> &lt;<em id="dds_02_0028__i933553419136">FILE_PATH</em>&gt; <strong id="dds_02_0028__b12335173416132">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0028__p1133683414132">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0028__screen133619348139">Enter password:</pre>
</li><li id="dds_02_0028__li16336143431315">Method 2: Using standard URI format<p id="dds_02_0028__p10336103413131"><a name="dds_02_0028__li16336143431315"></a><a name="li16336143431315"></a><strong id="dds_02_0028__b2336173411318">mongo</strong> <strong id="dds_02_0028__b833693471310">mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0028__b1336133418138">@</strong><em id="dds_02_0028__i12336163431310">&lt;</em><em id="dds_02_0028__i16336133416138">DB_HOST</em><em id="dds_02_0028__i183363345135">&gt;</em><strong id="dds_02_0028__b1933673416135">:</strong><em id="dds_02_0028__i5336034151317">&lt;</em><em id="dds_02_0028__i133361634171319">DB_PORT</em><em id="dds_02_0028__i83367347138">&gt;</em><strong id="dds_02_0028__b8336934161319">/test?authSource=admin</strong> <strong id="dds_02_0028__b1133653481315">--ssl --sslCAFile</strong> &lt;<em id="dds_02_0028__i18336113491310">FILE_PATH</em>&gt; <strong id="dds_02_0028__b1133613420135">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0028__p1416193382811">The connection information can be obtained in the <span class="uicontrol" id="dds_02_0028__uicontrol65901721185511"><b>Address</b></span> column on the <span class="uicontrol" id="dds_02_0028__uicontrol859242117554"><b>Instance Management</b></span> page.</p>
</li></ul>
<div class="note" id="dds_02_0028__note1733615346138"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0028__ul83371634141320"><li id="dds_02_0028__li1433710341139">A single node instance uses the management IP address to generate SSL certificate. <strong id="dds_02_0028__b11237947397">--sslAllowInvalidHostnames</strong> is needed for the SSL connection over private networks.</li><li id="dds_02_0028__li19337193415138"><strong id="dds_02_0028__b56174501216">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0028__uicontrol197545151219"><b>Private IP Address</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0028__uicontrol16713452123"><b>Connections</b></span> page.</li><li id="dds_02_0028__li1933793411132"><strong id="dds_02_0028__b13405171813136">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0028__uicontrol1440620180133"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0028__uicontrol240641815139"><b>Basic Information</b></span> area on the <strong id="dds_02_0028__b114078184135">Connections</strong> page.</li><li id="dds_02_0028__li1580548181613"><strong id="dds_02_0028__b122771121719">DB_HOST</strong> and <strong id="dds_02_0028__b4971121661715">DB_PORT</strong> can also be obtained from the Node Information area on the Basic Information page.</li><li id="dds_02_0028__li13338153441318"><strong id="dds_02_0028__en-us_topic_0085335422_en-us_topic_0031147618_b84235270617104">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0028__en-us_topic_0085335422_b84235270619744">rwuser</strong>.</li><li id="dds_02_0028__li104164519302"><strong id="dds_02_0028__b14184563014"><em id="dds_02_0028__i194174593017">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0028__li122761750202211">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li><li id="dds_02_0028__li1733810349130"><strong id="dds_02_0028__b1035019117512">FILE_PATH</strong> indicates the path where the root certificate is stored.</li></ul>
</div></div>
<ul id="dds_02_0028__ul233816341135"><li id="dds_02_0028__li6338113411137">Connect to the DB instance using standard parameters. The following is an example command:<p id="dds_02_0028__p153386346132"><a name="dds_02_0028__li6338113411137"></a><a name="li6338113411137"></a><strong id="dds_02_0028__b133384348133">mongo --host 192.168.1.6 --port 8635 -u rwuser -p --authenticationDatabase admin --ssl --sslCAFile /tmp/ca.crt</strong> <strong id="dds_02_0028__b103381234111314">--sslAllowInvalidHostnames</strong></p>
</li><li id="dds_02_0028__li1433815346138">Connect to the DB instance using standard URI format. The following is an example command:<p id="dds_02_0028__p23391634101316"><a name="dds_02_0028__li1433815346138"></a><a name="li1433815346138"></a><strong id="dds_02_0028__b183396347139">mongo</strong> <strong id="dds_02_0028__b1333919341135">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0028__b1339734181317">192.168.1.6</strong><strong id="dds_02_0028__b16339183461310">:</strong><strong id="dds_02_0028__b333943431312">8635</strong><strong id="dds_02_0028__b6339103413136">/test?authSource=admin</strong><strong id="dds_02_0028__b1333903415130"> -</strong><strong id="dds_02_0028__b63391534181317">-ssl --sslCAFile</strong> <strong id="dds_02_0028__b9339113451319">/tmp/ca.crt</strong> <strong id="dds_02_0028__b033973410135">--sslAllowInvalidHostnames</strong></p>
</li></ul>
</p></li><li id="dds_02_0028__li833993451320"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><pre class="screen" id="dds_02_0028__screen143397345133">replica:PRIMARY&gt;</pre>
</p></li></ol>
</div>
<div class="section" id="dds_02_0028__en-us_topic_0085335422_sfc3bfb212a8440799f49320d91fc096c"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (Non-SSL)</h4><div class="notice" id="dds_02_0028__en-us_topic_0085335422_note45712120182235"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0028__p8755899182235">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0028__en-us_topic_0085335422_o12386b3d9147482881ddfdfd9a3f787c"><li id="dds_02_0028__en-us_topic_0085335422_lf50bb4c0b07747cfac89f74cc2b28b4a"><span>Connect to a <span class="keyword" id="dds_02_0028__keyword929914461813">DDS DB instance</span>.</span><p><ul id="dds_02_0028__ul7567173152111"><li id="dds_02_0028__li856712311210">Method 1: Using standard parameters<p id="dds_02_0028__p1546173416213"><a name="dds_02_0028__li856712311210"></a><a name="li856712311210"></a><strong id="dds_02_0028__b1567143119217">mongo --host</strong> &lt;<em id="dds_02_0028__i456717314219">DB_HOST</em>&gt; <strong id="dds_02_0028__b256763113211">--port</strong> &lt;<em id="dds_02_0028__i3567631142114">DB_PORT</em>&gt; <strong id="dds_02_0028__b16567731192119">-u</strong> &lt;<em id="dds_02_0028__i65672318217">DB_USER</em>&gt; <strong id="dds_02_0028__b637789133717">-p</strong> <strong id="dds_02_0028__b1156711315219">--authenticationDatabase</strong> <strong id="dds_02_0028__b2033119156376">admin</strong></p>
<p id="dds_02_0028__p3759945202019">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0028__screen6759145122016">Enter password:</pre>
</li><li id="dds_02_0028__li956719313217">Method 2: Using standard URI format<p id="dds_02_0028__p18264365212"><a name="dds_02_0028__li956719313217"></a><a name="li956719313217"></a><strong id="dds_02_0028__b1851992173718"><strong id="dds_02_0028__b2051972173710">mongo</strong></strong> <strong id="dds_02_0028__b165200219378">mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0028__b1692415451252">@</strong><em id="dds_02_0028__i15671331162116">&lt;</em><em id="dds_02_0028__i956773112112">DB_HOST</em><em id="dds_02_0028__i20567173113218">&gt;</em><strong id="dds_02_0028__b656763118210">:</strong><em id="dds_02_0028__i9567143122110">&lt;</em><em id="dds_02_0028__i1156723132117">DB_PORT</em><em id="dds_02_0028__i75674315214">&gt;</em><strong id="dds_02_0028__b4981817583">/test?authSource=admin</strong></p>
<p id="dds_02_0028__p318624972916">The connection information can be obtained in the <span class="uicontrol" id="dds_02_0028__uicontrol437183035518"><b>Address</b></span> column on the <span class="uicontrol" id="dds_02_0028__uicontrol1938830195512"><b>Instance Management</b></span> page.</p>
</li></ul>
<div class="note" id="dds_02_0028__note839816116261"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0028__ul83946567225"><li id="dds_02_0028__li146091023142317"><strong id="dds_02_0028__b195163306137">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0028__uicontrol151693031314"><b>Private IP Address</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0028__uicontrol1551715302131"><b>Connections</b></span> page.</li><li id="dds_02_0028__li2508131610233"><strong id="dds_02_0028__b4286842101312">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0028__uicontrol14288204216135"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0028__uicontrol528944221312"><b>Basic Information</b></span> area on the <strong id="dds_02_0028__b12891425133">Connections</strong> page.</li><li id="dds_02_0028__li1048914566199"><strong id="dds_02_0028__b9532115751917">DB_HOST</strong> and <strong id="dds_02_0028__b353255771914">DB_PORT</strong> can also be obtained from the Node Information area on the Basic Information page.</li><li id="dds_02_0028__li2512016202314"><strong id="dds_02_0028__b487053851718">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0028__b10870173819178">rwuser</strong>.</li><li id="dds_02_0028__li203011059313"><strong id="dds_02_0028__b0301145143113"><em id="dds_02_0028__i730113583115">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0028__li205880623112">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li></ul>
</div></div>
<ul id="dds_02_0028__ul106082418273"><li id="dds_02_0028__li45912247273">Connect to the DB instance using standard parameters. The following is an example command:<p id="dds_02_0028__p1138102682712"><a name="dds_02_0028__li45912247273"></a><a name="li45912247273"></a><strong id="dds_02_0028__b85912412716">mongo --host 192.168.1.6 --port 8635 -u rwuser -p --authenticationDatabase admin</strong></p>
</li><li id="dds_02_0028__li35911241274">Connect to the DB instance using standard URI format. The following is an example command:<p id="dds_02_0028__p43699277273"><a name="dds_02_0028__li35911241274"></a><a name="li35911241274"></a><strong id="dds_02_0028__b6128732153717"><strong id="dds_02_0028__b1112863218378">mongo</strong></strong> <strong id="dds_02_0028__b012812320375">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0028__b145952420279">192.168.1.6:8635</strong><strong id="dds_02_0028__b95942410270">/test?authSource=admin</strong></p>
</li></ul>
</p></li><li id="dds_02_0028__en-us_topic_0085335422_li2356085813016"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><pre class="screen" id="dds_02_0028__en-us_topic_0085335422_screen141854665519">replica:PRIMARY&gt;</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0074.html">Connecting to a Single-Node Instance Over Private Networks</a></div>
</div>
</div>

View File

@ -0,0 +1,46 @@
<a name="dds_02_0042"></a><a name="dds_02_0042"></a>
<h1 class="topictitle1">Connection Methods</h1>
<div id="body1568881417594"><p id="dds_02_0042__p1844611220281">You can access DDS over private or public networks.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_02_0042__table34881931174318" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Connection methods</caption><thead align="left"><tr id="dds_02_0042__row248916316436"><th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.2.5.1.1"><p id="dds_02_0042__p94898312434">Method</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.2.5.1.2"><p id="dds_02_0042__p10489131104311">IP Address</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43%" id="mcps1.3.2.2.5.1.3"><p id="dds_02_0042__p5489103154315">Scenario</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.3.2.2.5.1.4"><p id="dds_02_0042__p98541156195517">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_02_0042__row248973134318"><td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.2.5.1.1 "><p id="dds_02_0042__p48571255124517">Private network</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="dds_02_0042__p15489153115438">Private IP address</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.2.2.5.1.3 "><p id="dds_02_0042__p7735048144619">DDS provides a private IP address by default.</p>
<ul id="dds_02_0042__ul1044172235218"><li id="dds_02_0042__li2443225522">You are advised to use private IP address in following scenarios:<ul id="dds_02_0042__ul145143011523"><li id="dds_02_0042__li2041622755210">Your ECS instance is in the same VPC subnet as the DDS DB instance</li><li id="dds_02_0042__li1541614275520">ECS subnet and DDS subnet are connected to each other by VPC peering.</li></ul>
</li></ul>
<ul id="dds_02_0042__ul53814073144559"><li id="dds_02_0042__li46337654144559">By default, DDS is not accessible from ECSs that are not in the same security group. If the ECS is not in the same group, you need to add an inbound rule to enable access.</li><li id="dds_02_0042__li29581666144559">The default DDS port is 8635, but this port can be modified if necessary.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.2.2.5.1.4 "><p id="dds_02_0042__p226615564401">Secure and excellent performance</p>
</td>
</tr>
<tr id="dds_02_0042__row871255113459"><td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.2.5.1.1 "><p id="dds_02_0042__p55021336184516">Public network</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="dds_02_0042__p3714351114515"><span id="dds_02_0042__text1057240703"></span><span id="dds_02_0042__text18313194318019">EIP</span></p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.2.2.5.1.3 "><ul id="dds_02_0042__ul12205828421"><li id="dds_02_0042__li1633020014213">If your applications are running on an ECS that is in a different region from the one where the DB instance is located, you are advised to use an EIP to connect the ECS to your DDS DB instances.</li><li id="dds_02_0042__li163980484214">If your applications are deployed on another cloud platform, EIP is recommended.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.2.2.5.1.4 "><ul id="dds_02_0042__ul58856110012"><li id="dds_02_0042__li15886121406">Low security</li><li id="dds_02_0042__li9886319016">For faster transmission and improved security, you are advised to migrate your applications to an ECS that is in the same subnet as your DDS instance and use a private IP address to access the instance.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_replica_set.html">Getting Started with Replica Sets</a></div>
</div>
</div>

View File

@ -1,10 +1,10 @@
<a name="dds_02_0043"></a><a name="dds_02_0043"></a>
<h1 class="topictitle1">Logging In to the DDS Console</h1>
<h1 class="topictitle1">Logging in to the DDS Console</h1>
<div id="body1552545230537"><div class="section" id="dds_02_0043__section5966101210598"><h4 class="sectiontitle"><strong id="dds_02_0043__b14445498153">Prerequisites</strong></h4><p id="dds_02_0043__p12552131419454">You have registered an account.</p>
<p id="dds_02_0043__p33562152596">For the first time you use DDS, register an account at the official website. After the registration, your account has permissions to access the DDS service, as well as all other cloud services.</p>
<p id="dds_02_0043__p33562152596">For the first time you use DDS, apply for an account at the official website. After the application is successful, your account has permissions to access the DDS service, as well as all other cloud services.</p>
</div>
<div class="section" id="dds_02_0043__section162273713415"><h4 class="sectiontitle">Procedure</h4><ol id="dds_02_0043__ol1679419416719"><li id="dds_02_0043__li2057364417214"><span>Log in to the management console.</span></li><li id="dds_02_0043__li07647256118"><span>Click <span><img id="dds_02_0043__image874819251118" src="en-us_image_0284275118.png"></span> in the upper left corner and select a region and a project.</span></li><li id="dds_02_0043__li5100854214"><span>Click <strong id="dds_02_0043__b7660948648">Service List</strong>. Under <strong id="dds_02_0043__b146601481545">Database</strong>, click <strong id="dds_02_0043__b146601648745">Document Database Service</strong> to go to the DDS console.</span></li></ol>
<div class="section" id="dds_02_0043__section162273713415"><h4 class="sectiontitle">Procedure</h4><ol id="dds_02_0043__ol1679419416719"><li id="dds_02_0043__li2057364417214"><span>Log in to the management console.</span></li><li id="dds_02_0043__li07647256118"><span>Click <span><img id="dds_02_0043__image874819251118" src="en-us_image_0000001096133926.png"></span> in the upper left corner and select a region and a project.</span></li><li id="dds_02_0043__li5100854214"><span>Click <strong id="dds_02_0043__b7660948648">Service List</strong>. Under <strong id="dds_02_0043__b146601481545">Database</strong>, click <strong id="dds_02_0043__b146601648745">Document Database Service</strong> to go to the DDS console.</span></li></ol>
</div>
</div>

View File

@ -0,0 +1,22 @@
<a name="dds_02_0046"></a><a name="dds_02_0046"></a>
<h1 class="topictitle1">Binding an EIP</h1>
<div id="body1522136462404"><div class="section" id="dds_02_0046__section055104935914"><h4 class="sectiontitle"><strong id="dds_02_0046__b10875147182618">Scenarios</strong></h4><p id="dds_02_0046__p171361239153218">After you create a DB instance, you can bind it to an <span id="dds_02_0046__text5347529164615">EIP</span><span id="dds_02_0046__text148921833154616"></span> to allow external access. If you want to prohibit external access later, you can also unbind the EIP from the DB instance.</p>
</div>
<div class="section" id="dds_02_0046__section1130510262514"><h4 class="sectiontitle">Precautions</h4><ul id="dds_02_0046__ul15712132844"><li id="dds_02_0046__li13712152748">Before accessing a database, you need to apply for an <span id="dds_02_0046__text12115114904613">EIP</span><span id="dds_02_0046__text16115164920463"></span> on the VPC console. Then, add an inbound rule to allow the IP addresses or IP address ranges of ECSs. For details, see section <a href="dds_02_0019.html">Setting a Security Group</a>.</li><li id="dds_02_0046__li137122023418">In the cluster instance, only mongos can be bound to an <span id="dds_02_0046__text1493612568465">EIP</span><span id="dds_02_0046__text99362563461"></span>. To change the <span id="dds_02_0046__text97581238476">EIP</span><span id="dds_02_0046__text1875815311474"></span> that has been bound to a node, you need to unbind it from the node first.</li></ul>
</div>
<div class="section" id="dds_02_0046__section3199593620428"><a name="dds_02_0046__section3199593620428"></a><a name="section3199593620428"></a><h4 class="sectiontitle">Binding an <span id="dds_02_0046__text177791721153913">EIP</span><span id="dds_02_0046__text4780421123918"></span></h4><ol id="dds_02_0046__ol12603704105129"><li id="dds_02_0046__li46324476105129"><span>On the <strong id="dds_02_0046__b84235270615219">Instance Management</strong> page, click the target cluster instance.</span></li><li id="dds_02_0046__li349825362319"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0046__uicontrol15916566265"><b>Connections</b></span>. In the <strong id="dds_02_0046__b743512366392">Basic Information</strong> area, locate the target mongos node and click <strong id="dds_02_0046__b1643633673919">Bind EIP</strong> in the <strong id="dds_02_0046__b5438153693917">Operation</strong> column.</span><p><p id="dds_02_0046__p01821156154813">Or in the <strong id="dds_02_0046__b17561158144012">Node Information</strong> area on the <strong id="dds_02_0046__b153761534110">Basic Information</strong> page, locate the target mongos node and choose <strong id="dds_02_0046__b051943016416">More</strong> &gt; <strong id="dds_02_0046__b124701337412">Bind EIP</strong> in the <strong id="dds_02_0046__b62371336144110">Operation</strong> column.</p>
</p></li><li id="dds_02_0046__li14267104105129"><span>In the displayed dialog box, all available unbound EIPs are listed. Select the required <span id="dds_02_0046__text1373018458489">EIP</span><span id="dds_02_0046__text127302045134810"></span> and click <strong id="dds_02_0046__b132941115422">OK</strong>. If no available EIPs are displayed, click <strong id="dds_02_0046__b12732191694419">View EIP</strong> and create an <span id="dds_02_0046__text713712644915">EIP</span><span id="dds_02_0046__text161371768492"></span> on the VPC console.</span></li><li id="dds_02_0046__li17560260102159"><span>In the <strong id="dds_02_0046__b46581858114416">EIP</strong> column on the <strong id="dds_02_0046__b18732205534411">mongos</strong> tab, view the <span id="dds_02_0046__text4815132834917">EIP</span><span id="dds_02_0046__text2815122894918"></span> that is successfully bound.</span><p><p id="dds_02_0046__p32760134103252">To unbind an EIP from the DB instance, see <a href="#dds_02_0046__section186511510267">Unbinding an EIP</a>.</p>
</p></li></ol>
</div>
<div class="section" id="dds_02_0046__section186511510267"><a name="dds_02_0046__section186511510267"></a><a name="section186511510267"></a><h4 class="sectiontitle">Unbinding an <span id="dds_02_0046__text16988121194516">EIP</span><span id="dds_02_0046__text89891121144512"></span></h4><ol id="dds_02_0046__ol31276680102616"><li id="dds_02_0046__li35235350102616"><span>On the <strong id="dds_02_0046__b34027572411917">Instance Management</strong> page, click the target cluster instance.</span></li><li id="dds_02_0046__li15539153193217"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0046__uicontrol8299182120338"><b>Connections</b></span>. In the <strong id="dds_02_0046__b553193234517">Basic Information</strong> area, locate the target mongos node and click <strong id="dds_02_0046__b165414329451">Unbind EIP</strong> in the <strong id="dds_02_0046__b75573218456">Operation</strong> column.</span><p><p id="dds_02_0046__p10693102185417">Or in the <strong id="dds_02_0046__b1745464113455">Node Information</strong> area on the <strong id="dds_02_0046__b845474184520">Basic Information</strong> page, locate the target mongos node and choose <strong id="dds_02_0046__b0455841134512">More</strong> &gt; <strong id="dds_02_0046__b1645618411455">Unbind EIP</strong> in the <strong id="dds_02_0046__b11457144164515">Operation</strong> column.</p>
</p></li><li id="dds_02_0046__li56439840102720"><span>In the displayed dialog box, click <strong id="dds_02_0046__b395412212479">Yes</strong>.</span><p><p id="dds_02_0046__p21771104103056">To bind an EIP to the DB instance again, see <a href="#dds_02_0046__section3199593620428">Binding an EIP</a>.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0013.html">Connecting to a Cluster Instance Over Public Networks</a></div>
</div>
</div>

View File

@ -0,0 +1,87 @@
<a name="dds_02_0047"></a><a name="dds_02_0047"></a>
<h1 class="topictitle1">Connecting to a Replica Set Instance Over Public Networks</h1>
<div id="body1568881417594"><div class="section" id="dds_02_0047__en-us_topic_0085335422_section46429645141251"><h4 class="sectiontitle"><strong id="dds_02_0047__b3230773327">Scenarios</strong></h4><p id="dds_02_0047__p2055118186348">This section describes how to connect to a replica set instance using the MongoDB client and Robo 3T over public networks.</p>
<p id="dds_02_0047__p912664163410">You can directly perform operations on the primary and secondary nodes. Primary nodes are used for processing read and write requests. Secondary nodes replicate data from the primary and are used for processing read requests only.</p>
<p id="dds_02_0047__p2551818153416">The MongoDB client and Robo 3T can connect to a DB instance with an unencrypted connection or an encrypted connection (SSL). To improve data transmission security, you are advised to connect to DB instances using the SSL connection.</p>
<p id="dds_02_0047__p12551118173416"><strong id="dds_02_0047__b67401533193210">Different OS scenarios</strong>: Examples include Linux and Windows clients.</p>
</div>
<div class="section" id="dds_02_0047__en-us_topic_0085335422_section12950115493212"><h4 class="sectiontitle"><strong id="dds_02_0047__b576193463613">Prerequisites</strong></h4><ol id="dds_02_0047__ol3246193120481"><li id="dds_02_0047__li157944426489"><a href="dds_02_0053.html">Bind an EIP</a> to the Replica set instance and <a href="dds_02_0054.html">set security group rules</a> to ensure that the EIP can be accessed with the DB client application.</li><li id="dds_02_0047__li1166891112506">Install the MongoDB client or Robo 3T.<p id="dds_02_0047__p117191137520"><a name="dds_02_0047__li1166891112506"></a><a name="li1166891112506"></a><strong id="dds_02_0047__b1655123612117">MongoDB client</strong></p>
<ol type="a" id="dds_02_0047__ol135814209524"><li id="dds_02_0047__li467172923518">For details on how to create and log in to an ECS, see "Creating and Logging In to a Windows ECS" or "Creating and Logging In to a Linux ECS" in the <em id="dds_02_0047__i619013396218">Elastic Cloud Server User Guide</em>.</li><li id="dds_02_0047__li1369583718523">Install the MongoDB client on the <span id="dds_02_0047__text77131852611">ECS</span><span id="dds_02_0047__text138111812617"></span>.<p id="dds_02_0047__p1760103735017">For details on how to install a MongoDB client, see <a href="dds_faq_0018.html">How Can I Install a MongoDB Client?</a></p>
</li></ol>
<p id="dds_02_0047__p1334835714533"><strong id="dds_02_0047__b123650256259">Robo 3T</strong></p>
<p id="dds_02_0047__p7880966497">For details on how to install Robo 3T, see <a href="dds_faq_0039.html">How Do I Install Robo 3T?</a></p>
</li><li id="dds_02_0047__li1647003915233">If SSL is enabled, download the SSL certificate on the DDS console.<ol type="a" id="dds_02_0047__ol122491412162415"><li id="dds_02_0047__li885613240">On the <strong id="dds_02_0047__b149836126274">Instance Management</strong> page, click the target DB instance.</li><li id="dds_02_0047__li17853172410">In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0047__uicontrol17623152276"><b>Connections</b></span>.</li><li id="dds_02_0047__li0861616247">In the <strong id="dds_02_0047__b13417111817277">Basic Information</strong> area, click <span><img id="dds_02_0047__image1586141132414" src="en-us_image_0000001143053801.png"></span> next to the <strong id="dds_02_0047__b54191118102710">SSL</strong> field.</li></ol>
<div class="note" id="dds_02_0047__note970419585019"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_02_0047__p15704125819011">The certificate can also be downloaded from the Node Information area on the Basic Information page.</p>
</div></div>
</li></ol>
</div>
<div class="section" id="dds_02_0047__section48455364496"><h4 class="sectiontitle">Connecting to a DB Instance Using Robo 3T (SSL)</h4><div class="notice" id="dds_02_0047__note19423175081418"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0047__p1470685611553">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0047__ol9845153614917"><li id="dds_02_0047__li18451436184912"><span>Run the installed Robo 3T. On the displayed dialog box, click <strong id="dds_02_0047__b138194598272">Create</strong>.</span><p><div class="fignone" id="dds_02_0047__fig10845936194920"><span class="figcap"><b>Figure 1 </b>Connections</span><br><span><img id="dds_02_0047__image1684593664911" src="en-us_image_0000001142893853.png"></span></div>
</p></li><li id="dds_02_0047__li284593614914"><span>In the <strong id="dds_02_0047__b1291463284">Connection Settings</strong> dialog box, set the parameters of the new connection.</span><p><ol type="a" id="dds_02_0047__ol2084593684912"><li id="dds_02_0047__li1384512364499">On the <strong id="dds_02_0047__b36881688287">Connection</strong> tab, enter the name of the new connection in the <strong id="dds_02_0047__b1468998152818">Name</strong> text box and enter the EIP and database port that are bound to the replica set instance in the <strong id="dds_02_0047__b20690589283">Address</strong> text box.<div class="fignone" id="dds_02_0047__fig128455367493"><span class="figcap"><b>Figure 2 </b>Connection</span><br><span><img id="dds_02_0047__image15846536144919" src="en-us_image_0000001096453842.png"></span></div>
</li><li id="dds_02_0047__li884616365499">On the <strong id="dds_02_0047__b5179135913284">Authentication</strong> tab, set <strong id="dds_02_0047__b1918095932817">Database</strong> to <strong id="dds_02_0047__b111801959122818">admin</strong>, <strong id="dds_02_0047__b718155992813">User Name</strong> to <strong id="dds_02_0047__b121822597289">rwuser</strong>, and <strong id="dds_02_0047__b8183959152810">Password</strong> to the administrator password you set during the creation of the replica set instance.<div class="fignone" id="dds_02_0047__fig168461436144919"><span class="figcap"><b>Figure 3 </b>Authentication</span><br><span><img id="dds_02_0047__image184623616491" src="en-us_image_0000001142773895.png"></span></div>
</li><li id="dds_02_0047__li1648133312283">On the <strong id="dds_02_0047__b1032985362910">SSL</strong> tab, upload the SSL certificate and select <strong id="dds_02_0047__b1833112536290">Allowed</strong> for <strong id="dds_02_0047__b12332115320295">Invalid Hostnames</strong>.<div class="fignone" id="dds_02_0047__fig14399846163217"><span class="figcap"><b>Figure 4 </b>SSL</span><br><span><img id="dds_02_0047__image3401646143216" src="en-us_image_0000001142773903.png"></span></div>
</li><li id="dds_02_0047__li148461366497">Click <strong id="dds_02_0047__b122691216308">Save</strong>.</li></ol>
</p></li><li id="dds_02_0047__li0846936164910"><span>On the <strong id="dds_02_0047__b1345119314307">MongoDB Connections</strong> page, click <strong id="dds_02_0047__b1345223163016">Connect</strong> to connect to the replica set instance.</span><p><div class="fignone" id="dds_02_0047__fig15846536174918"><span class="figcap"><b>Figure 5 </b>Connections</span><br><span><img id="dds_02_0047__image158461036184910" src="en-us_image_0000001095974038.png"></span></div>
</p></li><li id="dds_02_0047__li14846173654919"><span>If the replica set instance is successfully connected, the page shown in <a href="#dds_02_0047__fig78478367495">Figure 6</a> is displayed.</span><p><div class="fignone" id="dds_02_0047__fig78478367495"><a name="dds_02_0047__fig78478367495"></a><a name="fig78478367495"></a><span class="figcap"><b>Figure 6 </b>Connection succeeded</span><br><span><img id="dds_02_0047__image98471536174916" src="en-us_image_0000001095974034.png"></span></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0047__section238792617370"><h4 class="sectiontitle">Connecting to a DB Instance Using Robo 3T (Non-SSL)</h4><div class="notice" id="dds_02_0047__note156751999513"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0047__p8755899182235">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0047__ol0891837112610"><li id="dds_02_0047__li18891123792617"><span>Run the installed Robo 3T. On the displayed dialog box, click <strong id="dds_02_0047__b1765354919308">Create</strong>.</span><p><div class="fignone" id="dds_02_0047__fig8324212122213"><span class="figcap"><b>Figure 7 </b>Connections</span><br><span><img id="dds_02_0047__image1132521202215" src="en-us_image_0000001096293846.png"></span></div>
</p></li><li id="dds_02_0047__li1189173715261"><span>In the <strong id="dds_02_0047__b115414219312">Connection Settings</strong> dialog box, set the parameters of the new connection.</span><p><ol type="a" id="dds_02_0047__ol12321221151517"><li id="dds_02_0047__li20443123311916">On the <strong id="dds_02_0047__b283018235317">Connection</strong> tab, enter the name of the new connection in the <strong id="dds_02_0047__b1583082314314">Name</strong> text box and enter the EIP and database port that are bound to the replica set instance in the <strong id="dds_02_0047__b12830023173112">Address</strong> text box.<div class="fignone" id="dds_02_0047__fig45982550220"><span class="figcap"><b>Figure 8 </b>Connection</span><br><span><img id="dds_02_0047__image45991255192219" src="en-us_image_0000001096453840.png"></span></div>
</li><li id="dds_02_0047__li1444383310912">On the <strong id="dds_02_0047__b38541829143118">Authentication</strong> tab, set <strong id="dds_02_0047__b085482913112">Database</strong> to <strong id="dds_02_0047__b78541129163111">admin</strong>, <strong id="dds_02_0047__b685512920314">User Name</strong> to <strong id="dds_02_0047__b2855329133115">rwuser</strong>, and <strong id="dds_02_0047__b1485632973110">Password</strong> to the administrator password you set during the creation of the replica set instance.<div class="fignone" id="dds_02_0047__fig19511154611251"><span class="figcap"><b>Figure 9 </b>Authentication</span><br><span><img id="dds_02_0047__image10511846142515" src="en-us_image_0000001142773899.png"></span></div>
</li><li id="dds_02_0047__li34439331693">Click <strong id="dds_02_0047__b14188433143110">Save</strong>.</li></ol>
</p></li><li id="dds_02_0047__li38913377264"><span>On the <strong id="dds_02_0047__b556563620319">MongoDB Connections</strong> page, click <strong id="dds_02_0047__b1566193614312">Connect</strong> to connect to the replica set instance.</span><p><div class="fignone" id="dds_02_0047__fig13943185811558"><span class="figcap"><b>Figure 10 </b>Connections</span><br><span><img id="dds_02_0047__image694335875518" src="en-us_image_0000001096133860.png"></span></div>
</p></li><li id="dds_02_0047__li182324215276"><span>If the replica set instance is successfully connected, the page shown in <a href="#dds_02_0047__fig1450295643717">Figure 11</a> is displayed.</span><p><div class="fignone" id="dds_02_0047__fig1450295643717"><a name="dds_02_0047__fig1450295643717"></a><a name="fig1450295643717"></a><span class="figcap"><b>Figure 11 </b>Connection succeeded</span><br><span><img id="dds_02_0047__image105029565376" src="en-us_image_0000001096293844.png"></span></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0047__section3730754113815"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (SSL)</h4><div class="notice" id="dds_02_0047__note7193172763318"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0047__p01931327203316">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0047__ol1345351943914"><li id="dds_02_0047__li102171219141112"><span>On the <strong id="dds_02_0047__b14411035320">Instance Management</strong> page, click the target DB instance.</span></li><li id="dds_02_0047__li115474615474"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0047__uicontrol87481346328"><b>Connections</b></span>.</span></li><li id="dds_02_0047__li6501114181414"><span>In the <strong id="dds_02_0047__b162158143211">Basic Information</strong> area, click <span><img id="dds_02_0047__image18459281105" src="en-us_image_0000001143053799.png"></span> next to the <strong id="dds_02_0047__b1243816321">SSL</strong> field.</span></li><li id="dds_02_0047__li1245410194391"><span>Upload the root certificate to the <span id="dds_02_0047__text2051274118513">ECS</span><span id="dds_02_0047__text145121641175110"></span> to be connected to the DB instance.</span><p><p id="dds_02_0047__p136375213376">The following describes how to upload the certificate to a Linux and Window ECS:</p>
<ul id="dds_02_0047__ul13424163043717"><li id="dds_02_0047__li8427143019377">In Linux, run the following command:<div class="p" id="dds_02_0047__p114546199398"><a name="dds_02_0047__li8427143019377"></a><a name="li8427143019377"></a><strong id="dds_02_0047__b145461923917">scp</strong> <em id="dds_02_0047__i945461993911">&lt;IDENTITY_FILE&gt;</em> <em id="dds_02_0047__i194541719103918">&lt;REMOTE_USER&gt;</em><strong id="dds_02_0047__b445411923918">@</strong><em id="dds_02_0047__i0454201953913">&lt;REMOTE_ADDRESS&gt;</em><strong id="dds_02_0047__b10454131913398">:</strong><em id="dds_02_0047__i1045461910393">&lt;REMOTE_DIR&gt;</em><div class="note" id="dds_02_0047__note14454141943915"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0047__ul134541019193917"><li id="dds_02_0047__li114546193394"><strong id="dds_02_0047__b131147595253">IDENTITY_FILE</strong> indicates the directory where the root certificate resides. The file access permission is 600.</li><li id="dds_02_0047__li124553193398"><strong id="dds_02_0047__b206913572442">REMOTE_USER</strong> indicates the <span id="dds_02_0047__text8704547175120">ECS</span><span id="dds_02_0047__text177044475517"></span> OS user.</li><li id="dds_02_0047__li6455111910396"><strong id="dds_02_0047__b118410581445">REMOTE_ADDRESS</strong> indicates the <span id="dds_02_0047__text2841205725115">ECS</span><span id="dds_02_0047__text98411457155111"></span> address.</li><li id="dds_02_0047__li345514192395"><strong id="dds_02_0047__b17953115854410">REMOTE_DIR</strong> indicates the directory of the <span id="dds_02_0047__text4967432522">ECS</span><span id="dds_02_0047__text9968113105218"></span> to which the root certificate is uploaded.</li></ul>
</div></div>
</div>
</li><li id="dds_02_0047__li97711751103717">In Windows, upload the root certificate using the remote connection tool.</li></ul>
</p></li><li id="dds_02_0047__li15455181914394"><span>Connect to the DB instance in the directory where the MongoDB client is located.</span><p><ul id="dds_02_0047__ul104559191391"><li id="dds_02_0047__li20455419113913">Method 1: Using standard parameters<p id="dds_02_0047__p845514199396"><a name="dds_02_0047__li20455419113913"></a><a name="li20455419113913"></a><strong id="dds_02_0047__b1245571913391">mongo --host</strong> &lt;<em id="dds_02_0047__i54562197392">DB_HOST</em>&gt; <strong id="dds_02_0047__b1045691917395">--port</strong> &lt;<em id="dds_02_0047__i194566199394">DB_PORT</em>&gt; <strong id="dds_02_0047__b845641914399">-u</strong> &lt;<em id="dds_02_0047__i84566199390">DB_USER</em>&gt; <strong id="dds_02_0047__b124561319163919">-p</strong> <strong id="dds_02_0047__b945631916395">--authenticationDatabase</strong><strong id="dds_02_0047__b8456919123910"> admin </strong><strong id="dds_02_0047__b345641917391">--ssl --sslCAFile</strong> &lt;<em id="dds_02_0047__i345621913395">FILE_PATH</em>&gt; <strong id="dds_02_0047__b1645601913399">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0047__p245651914391">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0047__screen145671916398">Enter password:</pre>
</li><li id="dds_02_0047__li1645681913915">Method 2: Using standard URI format<p id="dds_02_0047__p245613197396"><a name="dds_02_0047__li1645681913915"></a><a name="li1645681913915"></a><strong id="dds_02_0047__b1145651973918"><strong id="dds_02_0047__b1456131983910">mongo</strong></strong> <strong id="dds_02_0047__b9456191953910">"mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0047__b14456201973912">@</strong><em id="dds_02_0047__i1345671983915">&lt;</em><em id="dds_02_0047__i104579197396">DB_HOST</em><em id="dds_02_0047__i1745720191393">&gt;</em><strong id="dds_02_0047__b1445791933913">:</strong><em id="dds_02_0047__i445701917399">&lt;</em><em id="dds_02_0047__i145731933919">DB_PORT</em><em id="dds_02_0047__i17457181933917">&gt;</em><strong id="dds_02_0047__b545721919393">/test?authSource=admin&amp;replicaSet=replic</strong><strong id="dds_02_0047__b1745715192398">a"</strong> <strong id="dds_02_0047__b174577197398">--</strong><strong id="dds_02_0047__b6458121912396">ssl --sslCAFile</strong> <em id="dds_02_0047__i6458191917397">&lt;</em><em id="dds_02_0047__i2045881920391">FILE_PATH</em><em id="dds_02_0047__i34581119143910">&gt;</em> <strong id="dds_02_0047__b204581119173912">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0047__p977444184011">To obtain the public connection address, click the instance name and choose <strong id="dds_02_0047__b331511393217">Connections</strong>. The address is displayed in <strong id="dds_02_0047__b143164333212">Public Network Connection Address</strong> field on the <strong id="dds_02_0047__b19316173113218">Public Connection</strong> tab.</p>
</li></ul>
<div class="note" id="dds_02_0047__note12458119143913"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0047__ul1945891912390"><li id="dds_02_0047__li0458151916393">A replica set instance uses the management IP address to generate SSL certificate. <strong id="dds_02_0047__b6606191518343">--sslAllowInvalidHostnames</strong> is needed for the SSL connection through a public network.</li><li id="dds_02_0047__li14458419123913"><strong id="dds_02_0047__b68174378613">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0047__uicontrol2818173715614"><b>EIP</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0047__uicontrol98182374616"><b>Connections</b></span> page.</li><li id="dds_02_0047__li13459141933920"><strong id="dds_02_0047__b15374553412">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0047__uicontrol65312455349"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0047__uicontrol15514518344"><b>Basic Information</b></span> area on the <strong id="dds_02_0047__b1655164543418">Connections</strong> page.</li><li id="dds_02_0047__li15863397408"><strong id="dds_02_0047__b1581444154016">DB_HOST</strong> and <strong id="dds_02_0047__b1387705014403">DB_PORT</strong> can also be obtained from the Node Information area on the Basic Information page.</li><li id="dds_02_0047__li16460161973911"><strong id="dds_02_0047__b1281810133510">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0047__b1082080173519">rwuser</strong>.</li><li id="dds_02_0047__li1393212219304"><strong id="dds_02_0047__b17933142214306"><em id="dds_02_0047__i1693342223019">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0047__li122761750202211">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li><li id="dds_02_0047__li54601619123914"><strong id="dds_02_0047__b18941015183515">FILE_PATH</strong> indicates the path where the root certificate is stored.</li></ul>
</div></div>
<ul id="dds_02_0047__ul546017197393"><li id="dds_02_0047__li154601519163917">Connect to the instance using standard parameters. The following is an example command:<p id="dds_02_0047__p1592345744215"><a name="dds_02_0047__li154601519163917"></a><a name="li154601519163917"></a><strong id="dds_02_0047__b892345734218">mongo </strong><strong id="dds_02_0047__b9923175714216">--host replica/192.168.1.6,192.168.1.80 --port 8635 -u rwuser -p --authenticationDatabase admin --ssl --sslCAFile /tmp/ca.crt</strong> <strong id="dds_02_0047__b892345734217">--sslAllowInvalidHostnames</strong></p>
</li><li id="dds_02_0047__li1946020192399">Connect to the DB instance Using standard URI format. The following is an example command:<p id="dds_02_0047__p16461171914399"><a name="dds_02_0047__li1946020192399"></a><a name="li1946020192399"></a><strong id="dds_02_0047__b4461171916397"><strong id="dds_02_0047__b1946131983919">mongo</strong></strong> <strong id="dds_02_0047__b16461819103918">"mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0047__b546116194394"><strong id="dds_02_0047__b24611919133911">192.168.1.80</strong><strong id="dds_02_0047__b18461201923919">:</strong><strong id="dds_02_0047__b1846181910396">8635</strong></strong><strong id="dds_02_0047__b946151917392">/test?authSource=admin&amp;replicaSet=replica<strong id="dds_02_0047__b446111194399">"</strong></strong> <strong id="dds_02_0047__b946161933917">--ssl --sslCAFile</strong> <strong id="dds_02_0047__b946114193392">/tmp/ca.crt</strong> <strong id="dds_02_0047__b046111912393">--sslAllowInvalidHostnames</strong></p>
</li></ul>
</p></li><li id="dds_02_0047__li18461819163917"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><ul id="dds_02_0047__ul10461151914395"><li id="dds_02_0047__li1146141993919">Result from connecting to the primary node in a replica set or connecting to the whole replica set:<pre class="screen" id="dds_02_0047__screen3461151963916">replica:PRIMARY&gt;</pre>
</li><li id="dds_02_0047__li24613190397">Result from connecting the secondary node in a replica set:<pre class="screen" id="dds_02_0047__screen15461181917395">replica:SECONDARY&gt;</pre>
</li></ul>
</p></li></ol>
</div>
<div class="section" id="dds_02_0047__section15798154693317"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (Non-SSL)</h4><div class="notice" id="dds_02_0047__en-us_topic_0085335422_note45712120182235"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0047__p4254182110517">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0047__en-us_topic_0085335422_o12386b3d9147482881ddfdfd9a3f787c"><li id="dds_02_0047__en-us_topic_0085335422_lf50bb4c0b07747cfac89f74cc2b28b4a"><span>Connect to a <span class="keyword" id="dds_02_0047__keyword929914461813">DDS DB instance</span>.</span><p><ul id="dds_02_0047__ul7658651537"><li id="dds_02_0047__li465816511239">Method 1: Using standard parameters<p id="dds_02_0047__en-us_topic_0085335422_p6129489612597"><a name="dds_02_0047__li465816511239"></a><a name="li465816511239"></a><strong id="dds_02_0047__en-us_topic_0085335422_b24308785171016">mongo --host</strong> &lt;<em id="dds_02_0047__en-us_topic_0085335422_i3943596517931">DB_HOST</em>&gt; <strong id="dds_02_0047__en-us_topic_0085335422_b51875524143035">--port</strong> &lt;<em id="dds_02_0047__en-us_topic_0085335422_i6462580917936">DB_PORT</em>&gt; <strong id="dds_02_0047__en-us_topic_0085335422_b26007606165312">-u</strong> &lt;<em id="dds_02_0047__en-us_topic_0085335422_i562728517940">DB_USER</em>&gt; <strong id="dds_02_0047__b185111416356">-p</strong> <strong id="dds_02_0047__en-us_topic_0085335422_b4258861217920">--authenticationDatabase</strong> <strong id="dds_02_0047__b9828348183514">admin</strong></p>
<p id="dds_02_0047__p114291045245">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0047__screen5430184517413">Enter password:</pre>
</li><li id="dds_02_0047__li7480185615311">Method 2: Using standard URI format<p id="dds_02_0047__p116802419435"><a name="dds_02_0047__li7480185615311"></a><a name="li7480185615311"></a><strong id="dds_02_0047__b988273245520">mongo "</strong><strong id="dds_02_0047__b1588663275511">mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0047__b1988923212558">@</strong><em id="dds_02_0047__i13891143212556">&lt;</em><em id="dds_02_0047__i158921032135516">DB_HOST</em><em id="dds_02_0047__i19893032105515">&gt;</em><strong id="dds_02_0047__b58934329552">:</strong><em id="dds_02_0047__i989363211558">&lt;</em><em id="dds_02_0047__i289516329557">DB_PORT</em><em id="dds_02_0047__i496295511591">&gt;</em><strong id="dds_02_0047__b5905123275512">/test?authSource=admin&amp;replicaSet=replica</strong><strong id="dds_02_0047__b69061932155511">"</strong></p>
<p id="dds_02_0047__p495061418449">To obtain the public connection address, click the instance name and choose <strong id="dds_02_0047__b4469417193214">Connections</strong>. The address is displayed in <strong id="dds_02_0047__b0469151733215">Public Network Connection Address</strong> field on the <strong id="dds_02_0047__b16470717203215">Public Connection</strong> tab.</p>
</li></ul>
<div class="note" id="dds_02_0047__note839816116261"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0047__ul10720641042"><li id="dds_02_0047__li67211141348"><strong id="dds_02_0047__b56969441467">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0047__uicontrol15697544266"><b>EIP</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0047__uicontrol06981344964"><b>Connections</b></span> page.</li><li id="dds_02_0047__li2729114846"><strong id="dds_02_0047__b317248173718">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0047__uicontrol6173158103718"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0047__uicontrol1017317810376"><b>Basic Information</b></span> area on the <strong id="dds_02_0047__b15175583371">Connections</strong> page.</li><li id="dds_02_0047__li13604648174618"><strong id="dds_02_0047__b45421758194614">DB_HOST</strong> and <strong id="dds_02_0047__b690910614475">DB_PORT</strong> can also be obtained from the Node Information area on the Basic Information page.</li><li id="dds_02_0047__li273215410414"><strong id="dds_02_0047__b16243121016374">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0047__b15244151013715">rwuser</strong>.</li><li id="dds_02_0047__li5303103512302"><strong id="dds_02_0047__b1730373512307"><em id="dds_02_0047__i03033350303">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0047__li38738398300">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li></ul>
</div></div>
<ul id="dds_02_0047__ul4976132291217"><li id="dds_02_0047__li4976122201215">Connect to the instance using standard parameters. The following is an example command:<p id="dds_02_0047__p99537413498"><a name="dds_02_0047__li4976122201215"></a><a name="li4976122201215"></a><strong id="dds_02_0047__b7312124394916">mongo </strong><strong id="dds_02_0047__b1731294314491">--host replica/192.168.1.6,192.168.1.80 --port 8635 -u rwuser -p --authenticationDatabase admin</strong></p>
</li><li id="dds_02_0047__li897632219129">Connect to the DB instance Using standard URI format. The following is an example command:<p id="dds_02_0047__p7633267124"><a name="dds_02_0047__li897632219129"></a><a name="li897632219129"></a><strong id="dds_02_0047__b1097632261220">mongo "</strong><strong id="dds_02_0047__b5976522111210">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0047__b13394447111112"><strong id="dds_02_0047__b839694711114">192.168.1.80</strong><strong id="dds_02_0047__b439714771111">:</strong><strong id="dds_02_0047__b1239874731114">8635</strong></strong><strong id="dds_02_0047__b5619423155910">/test?authSource=admin&amp;replicaSet=repli</strong><strong id="dds_02_0047__b6416112418594">ca</strong><strong id="dds_02_0047__b6419524115917">"</strong></p>
</li></ul>
</p></li><li id="dds_02_0047__en-us_topic_0085335422_li2356085813016"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><ul id="dds_02_0047__en-us_topic_0085335422_ul18161746175515"><li id="dds_02_0047__li889442214500">Result from connecting to the primary node in a replica set or connecting to the whole replica set:<pre class="screen" id="dds_02_0047__screen7894152212502">replica:PRIMARY&gt;</pre>
</li><li id="dds_02_0047__en-us_topic_0085335422_li202171754198">Result from connecting the secondary node in a replica set:<pre class="screen" id="dds_02_0047__en-us_topic_0085335422_screen699818159103">replica:SECONDARY&gt;</pre>
</li></ul>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0050.html">Connecting to a Replica Set Instance Over Public Networks</a></div>
</div>
</div>

View File

@ -0,0 +1,84 @@
<a name="dds_02_0048"></a><a name="dds_02_0048"></a>
<h1 class="topictitle1">Connecting to a Single Node Instance Over Public Networks</h1>
<div id="body1568881417594"><div class="section" id="dds_02_0048__en-us_topic_0085335422_section46429645141251"><h4 class="sectiontitle"><strong id="dds_02_0048__b44681658414">Scenarios</strong></h4><p id="dds_02_0048__p2055118186348">This section describes how to connect to a single-node instance using the MongoDB client and Robo 3T over public networks.</p>
<p id="dds_02_0048__p2551818153416">The MongoDB client and Robo 3T can connect to a DB instance with an unencrypted connection or an encrypted connection (SSL). To improve data transmission security, you are advised to connect to DB instances using the SSL connection.</p>
<p id="dds_02_0048__p12551118173416"><strong id="dds_02_0048__b18177165483515">Different OS scenarios</strong>: Examples include Linux and Windows clients.</p>
</div>
<div class="section" id="dds_02_0048__section135810251275"><h4 class="sectiontitle"><strong id="dds_02_0048__b13463758115116">Prerequisites</strong></h4><ol id="dds_02_0048__ol3246193120481"><li id="dds_02_0048__li157944426489"><a href="dds_02_0026.html">Bind an EIP</a> to the Single node instance and <a href="dds_02_0080.html">set security group rules</a> to ensure that the <span id="dds_02_0048__text105559702912"></span><span id="dds_02_0048__text1972491092913">EIP</span> can be accessed with the DB client application.</li><li id="dds_02_0048__li1166891112506">Install the MongoDB client or Robo 3T.<p id="dds_02_0048__p117191137520"><a name="dds_02_0048__li1166891112506"></a><a name="li1166891112506"></a><strong id="dds_02_0048__b152491417538">MongoDB client</strong></p>
<ol type="a" id="dds_02_0048__ol135814209524"><li id="dds_02_0048__li467172923518">For details on how to create and log in to an ECS, see "Creating and Logging In to a Windows ECS" or "Creating and Logging In to a Linux ECS" in the <em id="dds_02_0048__i662423125313">Elastic Cloud Server User Guide</em>.</li><li id="dds_02_0048__li1369583718523">Install the MongoDB client on the <span id="dds_02_0048__text20431740182915">ECS</span><span id="dds_02_0048__text1243154015291"></span>.<p id="dds_02_0048__p1760103735017">For details on how to install a MongoDB client, see <a href="dds_faq_0018.html">How Can I Install a MongoDB Client?</a></p>
</li></ol>
<p id="dds_02_0048__p1334835714533"><strong id="dds_02_0048__b16903350125418">Robo 3T</strong></p>
<p id="dds_02_0048__p114019183527">For details on how to install Robo 3T, see <a href="dds_faq_0039.html">How Do I Install Robo 3T?</a></p>
</li><li id="dds_02_0048__li4213151922914">If SSL is enabled, download the SSL certificate on the DDS console.<ol type="a" id="dds_02_0048__ol122491412162415"><li id="dds_02_0048__li885613240">On the <strong id="dds_02_0048__b1317261211563">Instance Management</strong> page, click the target DB instance.</li><li id="dds_02_0048__li17853172410">In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0048__uicontrol1628916159568"><b>Connections</b></span>.</li><li id="dds_02_0048__li0861616247">In the <strong id="dds_02_0048__b147371817115617">Basic Information</strong> area, click <span><img id="dds_02_0048__image1586141132414" src="en-us_image_0000001096133902.png"></span> next to the <strong id="dds_02_0048__b117391117135611">SSL</strong> field.</li></ol>
<div class="note" id="dds_02_0048__note13665233152813"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dds_02_0048__p82811359286">The certificate can also be downloaded from the Node Information area on the Basic Information page.</p>
</div></div>
</li></ol>
</div>
<div class="section" id="dds_02_0048__section137404459523"><h4 class="sectiontitle">Connecting to a DB Instance Using Robo 3T (SSL)</h4><div class="notice" id="dds_02_0048__note156751999513"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0048__p43820110157">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0048__ol274012458521"><li id="dds_02_0048__li67401245145220"><span>Run the installed Robo 3T. On the displayed dialog box, click <strong id="dds_02_0048__b25101130145617">Create</strong>.</span><p><div class="fignone" id="dds_02_0048__fig187400455526"><span class="figcap"><b>Figure 1 </b>Connections</span><br><span><img id="dds_02_0048__image874011452522" src="en-us_image_0000001096133894.png"></span></div>
</p></li><li id="dds_02_0048__li2740154518521"><span>In the <strong id="dds_02_0048__b0350835205611">Connection Settings</strong> dialog box, set the parameters of the new connection.</span><p><ol type="a" id="dds_02_0048__ol47401345125210"><li id="dds_02_0048__li7740144525211">On the <strong id="dds_02_0048__b13244637195612">Connection</strong> tab, enter the name of the new connection in the <strong id="dds_02_0048__b1824573785617">Name</strong> text box and enter the EIP and database port that are bound to the single-node instance in the <strong id="dds_02_0048__b1124793705612">Address</strong> text box.<div class="fignone" id="dds_02_0048__fig87408452525"><span class="figcap"><b>Figure 2 </b>Connection</span><br><span><img id="dds_02_0048__image374014454529" src="en-us_image_0000001142893889.png"></span></div>
</li><li id="dds_02_0048__li12740045165212">On the <strong id="dds_02_0048__b189661851125614">Authentication</strong> tab, set <strong id="dds_02_0048__b096713513561">Database</strong> to <strong id="dds_02_0048__b1096812514564">admin</strong>, <strong id="dds_02_0048__b17968951105616">User Name</strong> to <strong id="dds_02_0048__b1697045155615">rwuser</strong>, and <strong id="dds_02_0048__b1970135145612">Password</strong> to the administrator password you set during the creation of the single-node instance.<div class="fignone" id="dds_02_0048__fig14740445175212"><span class="figcap"><b>Figure 3 </b>Authentication</span><br><span><img id="dds_02_0048__image1374104518522" src="en-us_image_0000001096133896.png"></span></div>
</li><li id="dds_02_0048__li1648133312283">On the <strong id="dds_02_0048__b196461750572">SSL</strong> tab, upload the SSL certificate and select <strong id="dds_02_0048__b146464520570">Allowed</strong> for <strong id="dds_02_0048__b12647050578">Invalid Hostnames</strong>.<div class="fignone" id="dds_02_0048__fig14399846163217"><span class="figcap"><b>Figure 4 </b>SSL</span><br><span><img id="dds_02_0048__image3401646143216" src="en-us_image_0000001143133835.png"></span></div>
</li><li id="dds_02_0048__li874194517523">Click <strong id="dds_02_0048__b25951617205716">Save</strong>.</li></ol>
</p></li><li id="dds_02_0048__li127416452521"><span>On the <strong id="dds_02_0048__b14997918205714">MongoDB Connections</strong> page, click <strong id="dds_02_0048__b10999151811575">Connect</strong> to connect to the single-node instance.</span><p><div class="fignone" id="dds_02_0048__fig074117456529"><span class="figcap"><b>Figure 5 </b>Connections</span><br><span><img id="dds_02_0048__image1474114454528" src="en-us_image_0000001143053839.png"></span></div>
</p></li><li id="dds_02_0048__li474154525214"><span>If the single-node instance is successfully connected, the page shown in <a href="#dds_02_0048__fig167418454527">Figure 6</a> is displayed.</span><p><div class="fignone" id="dds_02_0048__fig167418454527"><a name="dds_02_0048__fig167418454527"></a><a name="fig167418454527"></a><span class="figcap"><b>Figure 6 </b>Connection succeeded</span><br><span><img id="dds_02_0048__image11741144519521" src="en-us_image_0000001142773935.png"></span></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0048__section238792617370"><h4 class="sectiontitle">Connecting to a DB Instance Using Robo 3T (Non-SSL)</h4><div class="notice" id="dds_02_0048__note44843514537"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0048__p8755899182235">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0048__ol0891837112610"><li id="dds_02_0048__li18891123792617"><span>Run the installed Robo 3T. On the displayed dialog box, click <strong id="dds_02_0048__b843215595716">Create</strong>.</span><p><div class="fignone" id="dds_02_0048__fig8324212122213"><span class="figcap"><b>Figure 7 </b>Connections</span><br><span><img id="dds_02_0048__image1132521202215" src="en-us_image_0000001096293880.png"></span></div>
</p></li><li id="dds_02_0048__li1189173715261"><span>In the <strong id="dds_02_0048__b467217115812">Connection Settings</strong> dialog box, set the parameters of the new connection.</span><p><ol type="a" id="dds_02_0048__ol12321221151517"><li id="dds_02_0048__li20443123311916">On the <strong id="dds_02_0048__b261903115810">Connection</strong> tab, enter the name of the new connection in the <strong id="dds_02_0048__b14620336582">Name</strong> text box and enter the EIP and database port that are bound to the single-node instance in the <strong id="dds_02_0048__b146204335813">Address</strong> text box.<div class="fignone" id="dds_02_0048__fig45982550220"><span class="figcap"><b>Figure 8 </b>Connection</span><br><span><img id="dds_02_0048__image153616411218" src="en-us_image_0000001143133839.png"></span></div>
</li><li id="dds_02_0048__li1444383310912">On the <strong id="dds_02_0048__b497108583">Authentication</strong> tab, set <strong id="dds_02_0048__b10911045811">Database</strong> to <strong id="dds_02_0048__b911910195814">admin</strong>, <strong id="dds_02_0048__b112171011582">User Name</strong> to <strong id="dds_02_0048__b181312101581">rwuser</strong>, and <strong id="dds_02_0048__b1114111010580">Password</strong> to the administrator password you set during the creation of the single-node instance.<div class="fignone" id="dds_02_0048__fig19511154611251"><span class="figcap"><b>Figure 9 </b>Authentication</span><br><span><img id="dds_02_0048__image12446154213315" src="en-us_image_0000001143133833.png"></span></div>
</li><li id="dds_02_0048__li34439331693">Click <strong id="dds_02_0048__b1093931419582">Save</strong>.</li></ol>
</p></li><li id="dds_02_0048__li38913377264"><span>On the <strong id="dds_02_0048__b2094851645818">MongoDB Connections</strong> page, click <strong id="dds_02_0048__b149491216125819">Connect</strong> to connect to the single-node instance.</span><p><div class="fignone" id="dds_02_0048__fig13943185811558"><span class="figcap"><b>Figure 10 </b>Connections</span><br><span><img id="dds_02_0048__image10559624405" src="en-us_image_0000001096453876.png"></span></div>
</p></li><li id="dds_02_0048__li182324215276"><span>If the single-node instance is successfully connected, the page shown in <a href="#dds_02_0048__fig17236526175520">Figure 11</a> is displayed.</span><p><div class="fignone" id="dds_02_0048__fig17236526175520"><a name="dds_02_0048__fig17236526175520"></a><a name="fig17236526175520"></a><span class="figcap"><b>Figure 11 </b>Connection succeeded</span><br><span><img id="dds_02_0048__image7236142685514" src="en-us_image_0000001096453878.png"></span></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0048__section17675112516136"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (SSL)</h4><div class="notice" id="dds_02_0048__note135358135314"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0048__p9535713203113">If you connect to a DB instance using this method, enable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__en-us_topic_0049044698_section45421719172826">Enabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0048__ol9332173415137"><li id="dds_02_0048__li102171219141112"><span>On the <strong id="dds_02_0048__b77396316587">Instance Management</strong> page, click the target DB instance.</span></li><li id="dds_02_0048__li115474615474"><span>In the navigation pane on the left, choose <span class="uicontrol" id="dds_02_0048__uicontrol134726334589"><b>Connections</b></span>.</span></li><li id="dds_02_0048__li6501114181414"><span>In the <strong id="dds_02_0048__b14793103415589">Basic Information</strong> area, click <span><img id="dds_02_0048__image18459281105" src="en-us_image_0000001143133837.png"></span> next to the <strong id="dds_02_0048__b197961034185818">SSL</strong> field.</span></li><li id="dds_02_0048__li1433333418132"><span>Upload the root certificate to the <span id="dds_02_0048__text1284553211308">ECS</span><span id="dds_02_0048__text17845143253017"></span> to be connected to the DB instance.</span><p><p id="dds_02_0048__p1933617718381">The following describes how to upload the certificate to a Linux and Window ECS:</p>
<ul id="dds_02_0048__ul1977195483815"><li id="dds_02_0048__li87711754113820">In Linux, run the following command:<div class="p" id="dds_02_0048__p333313461319"><a name="dds_02_0048__li87711754113820"></a><a name="li87711754113820"></a><strong id="dds_02_0048__b1733319342138">scp</strong> <em id="dds_02_0048__i3333034161319">&lt;IDENTITY_FILE&gt;</em> <em id="dds_02_0048__i8333173416130">&lt;REMOTE_USER&gt;</em><strong id="dds_02_0048__b93331334191317">@</strong><em id="dds_02_0048__i03331349135">&lt;REMOTE_ADDRESS&gt;</em><strong id="dds_02_0048__b5333103413136">:</strong><em id="dds_02_0048__i1933319340131">&lt;REMOTE_DIR&gt;</em><div class="note" id="dds_02_0048__note9333183415136"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0048__ul633473411138"><li id="dds_02_0048__li15334153461310"><strong id="dds_02_0048__b8348113062620">IDENTITY_FILE</strong> indicates the directory where the root certificate resides. The file access permission is 600.</li><li id="dds_02_0048__li3334734141318"><strong id="dds_02_0048__b136181910105517">REMOTE_USER</strong> indicates the <span id="dds_02_0048__text111711542193011">ECS</span><span id="dds_02_0048__text12171164219308"></span> OS user.</li><li id="dds_02_0048__li23345341134"><strong id="dds_02_0048__b525421418552">REMOTE_ADDRESS</strong> indicates the <span id="dds_02_0048__text9377147133014">ECS</span><span id="dds_02_0048__text10377144753016"></span> address.</li><li id="dds_02_0048__li13340345135"><strong id="dds_02_0048__b545331555519">REMOTE_DIR</strong> indicates the directory of the <span id="dds_02_0048__text744610532303">ECS</span><span id="dds_02_0048__text1544625333016"></span> to which the root certificate is uploaded.</li></ul>
</div></div>
</div>
</li></ul>
<ul id="dds_02_0048__ul16741818193920"><li id="dds_02_0048__li067514182397">In Windows, upload the root certificate using the remote connection tool.</li></ul>
</p></li><li id="dds_02_0048__li13341346136"><span>Connect to the DB instance in the directory where the MongoDB client is located.</span><p><ul id="dds_02_0048__ul16334634151317"><li id="dds_02_0048__li5334103421319">Method 1: Using standard parameters<p id="dds_02_0048__p2334734121318"><a name="dds_02_0048__li5334103421319"></a><a name="li5334103421319"></a><strong id="dds_02_0048__b33351034111319">mongo --host</strong> &lt;<em id="dds_02_0048__i93351934161311">DB_HOST</em>&gt; <strong id="dds_02_0048__b6335203491317">--port</strong> &lt;<em id="dds_02_0048__i19335193412136">DB_PORT</em>&gt; <strong id="dds_02_0048__b16335193431315">-u</strong> &lt;<em id="dds_02_0048__i2335153491311">DB_USER</em>&gt; <strong id="dds_02_0048__b33351034111311">-p</strong> <strong id="dds_02_0048__b1733519349132">--authenticationDatabase</strong><strong id="dds_02_0048__b5335183451315"> admin </strong><strong id="dds_02_0048__b333514342138">--ssl --sslCAFile</strong> &lt;<em id="dds_02_0048__i933553419136">FILE_PATH</em>&gt; <strong id="dds_02_0048__b12335173416132">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0048__p1133683414132">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0048__screen133619348139">Enter password:</pre>
</li><li id="dds_02_0048__li16336143431315">Method 2: Using standard URI format<p id="dds_02_0048__p10336103413131"><a name="dds_02_0048__li16336143431315"></a><a name="li16336143431315"></a><strong id="dds_02_0048__b2336173411318">mongo</strong> <strong id="dds_02_0048__b833693471310">mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0048__b1336133418138">@</strong><em id="dds_02_0048__i12336163431310">&lt;</em><em id="dds_02_0048__i16336133416138">DB_HOST</em><em id="dds_02_0048__i183363345135">&gt;</em><strong id="dds_02_0048__b1933673416135">:</strong><em id="dds_02_0048__i5336034151317">&lt;</em><em id="dds_02_0048__i133361634171319">DB_PORT</em><em id="dds_02_0048__i83367347138">&gt;</em><strong id="dds_02_0048__b8336934161319">/test?authSource=admin</strong> <strong id="dds_02_0048__b1133653481315">--ssl --sslCAFile</strong> &lt;<em id="dds_02_0048__i18336113491310">FILE_PATH</em>&gt; <strong id="dds_02_0048__b1133613420135">--sslAllowInvalidHostnames</strong></p>
<p id="dds_02_0048__p3446121775715">To obtain the public connection address, click the instance name and choose <strong id="dds_02_0048__b1586019101900">Connections</strong>. The address is displayed in <strong id="dds_02_0048__b12860111010015">Public Network Connection Address</strong> field on the <strong id="dds_02_0048__b208601910509">Public Connection</strong> tab.</p>
</li></ul>
<div class="note" id="dds_02_0048__note1733615346138"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0048__ul83371634141320"><li id="dds_02_0048__li1433710341139">A single node instance uses the management IP address to generate SSL certificate. <strong id="dds_02_0048__b125556321008">--sslAllowInvalidHostnames</strong> is needed for the SSL connection through a public network.</li><li id="dds_02_0048__li19337193415138"><strong id="dds_02_0048__b4421173914012">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0048__uicontrol4337123416134"><b>EIP</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0048__uicontrol8423639201"><b>Connections</b></span> page.</li><li id="dds_02_0048__li1933793411132"><strong id="dds_02_0048__b1593515018117">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0048__uicontrol1793614018113"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0048__uicontrol59371001914"><b>Basic Information</b></span> area on the <strong id="dds_02_0048__b11938180315">Connections</strong> page.</li><li id="dds_02_0048__li67784212329"><strong id="dds_02_0048__b677084410321">DB_HOST</strong> and <strong id="dds_02_0048__b616150153315">DB_PORT</strong> can also be obtained from the Node Information area on the Basic Information page.</li><li id="dds_02_0048__li13338153441318"><strong id="dds_02_0048__b10984104515">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0048__b9985104119">rwuser</strong>.</li><li id="dds_02_0048__li1580132493115"><strong id="dds_02_0048__b8802112413117"><em id="dds_02_0048__i1880222414310">&lt;password&gt; </em></strong>indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0048__li122761750202211">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li><li id="dds_02_0048__li1733810349130"><strong id="dds_02_0048__b96311831611">FILE_PATH</strong> indicates the path where the root certificate is stored.</li></ul>
</div></div>
<ul id="dds_02_0048__ul233816341135"><li id="dds_02_0048__li6338113411137">Connect to the instance using standard parameters. The following is an example command:<p id="dds_02_0048__p153386346132"><a name="dds_02_0048__li6338113411137"></a><a name="li6338113411137"></a><strong id="dds_02_0048__b133384348133">mongo --host 192.168.1.6 --port 8635 -u rwuser -p --authenticationDatabase admin --ssl --sslCAFile /tmp/ca.crt</strong> <strong id="dds_02_0048__b103381234111314">--sslAllowInvalidHostnames</strong></p>
</li><li id="dds_02_0048__li1433815346138">Connect to the DB instance using standard URI format. The following is an example command:<p id="dds_02_0048__p23391634101316"><a name="dds_02_0048__li1433815346138"></a><a name="li1433815346138"></a><strong id="dds_02_0048__b183396347139">mongo</strong> <strong id="dds_02_0048__b1333919341135">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0048__b1339734181317">192.168.1.80</strong><strong id="dds_02_0048__b16339183461310">:</strong><strong id="dds_02_0048__b333943431312">8635</strong><strong id="dds_02_0048__b6339103413136">/test?authSource=admin</strong><strong id="dds_02_0048__b1333903415130"> -</strong><strong id="dds_02_0048__b63391534181317">-ssl --sslCAFile</strong> <strong id="dds_02_0048__b9339113451319">/tmp/ca.crt</strong> <strong id="dds_02_0048__b033973410135">--sslAllowInvalidHostnames</strong></p>
</li></ul>
</p></li><li id="dds_02_0048__li833993451320"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><pre class="screen" id="dds_02_0048__screen143397345133">replica:PRIMARY&gt;</pre>
</p></li></ol>
</div>
<div class="section" id="dds_02_0048__section278014466539"><h4 class="sectiontitle">Connecting to a DB Instance Using the MongoDB Client (Non-SSL)</h4><div class="notice" id="dds_02_0048__en-us_topic_0085335422_note45712120182235"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_02_0048__p20154316527">If you connect to a DB instance using this method, disable the SSL connection. For details, see section <a href="dds_03_0074.html#dds_03_0074__section4225593518277">Disabling SSL</a>.</p>
</div></div>
<ol id="dds_02_0048__en-us_topic_0085335422_o12386b3d9147482881ddfdfd9a3f787c"><li id="dds_02_0048__en-us_topic_0085335422_lf50bb4c0b07747cfac89f74cc2b28b4a"><span>Connect to a <span class="keyword" id="dds_02_0048__keyword2078120035">DDS DB instance</span>.</span><p><ul id="dds_02_0048__ul7567173152111"><li id="dds_02_0048__li856712311210">Method 1: Using standard parameters<p id="dds_02_0048__p1546173416213"><a name="dds_02_0048__li856712311210"></a><a name="li856712311210"></a><strong id="dds_02_0048__b1567143119217">mongo --host</strong> &lt;<em id="dds_02_0048__i456717314219">DB_HOST</em>&gt; <strong id="dds_02_0048__b256763113211">--port</strong> &lt;<em id="dds_02_0048__i3567631142114">DB_PORT</em>&gt; <strong id="dds_02_0048__b16567731192119">-u</strong> &lt;<em id="dds_02_0048__i65672318217">DB_USER</em>&gt; <strong id="dds_02_0048__b637789133717">-p</strong> <strong id="dds_02_0048__b1156711315219">--authenticationDatabase</strong> <strong id="dds_02_0048__b2033119156376">admin</strong></p>
<p id="dds_02_0048__p3759945202019">Enter the database account password when prompted:</p>
<pre class="screen" id="dds_02_0048__screen6759145122016">Enter password:</pre>
</li><li id="dds_02_0048__li956719313217">Method 2: Using standard URI format<p id="dds_02_0048__p18264365212"><a name="dds_02_0048__li956719313217"></a><a name="li956719313217"></a><strong id="dds_02_0048__b1851992173718">mongo</strong> <strong id="dds_02_0048__b165200219378">mongodb://rwuser:</strong>&lt;password&gt;<strong id="dds_02_0048__b1692415451252">@</strong><em id="dds_02_0048__i15671331162116">&lt;</em><em id="dds_02_0048__i956773112112">DB_HOST</em><em id="dds_02_0048__i20567173113218">&gt;</em><strong id="dds_02_0048__b656763118210">:</strong><em id="dds_02_0048__i9567143122110">&lt;</em><em id="dds_02_0048__i1156723132117">DB_PORT</em><em id="dds_02_0048__i75674315214">&gt;</em><strong id="dds_02_0048__b4981817583">/test?authSource=admin</strong></p>
<p id="dds_02_0048__p318624972916">To obtain the public connection address, click the instance name and choose <strong id="dds_02_0048__b534517285310">Connections</strong>. The address is displayed in <strong id="dds_02_0048__b1334532833111">Public Network Connection Address</strong> field on the <strong id="dds_02_0048__b11347142823118">Public Connection</strong> tab.</p>
</li></ul>
<div class="note" id="dds_02_0048__note839816116261"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0048__ul83946567225"><li id="dds_02_0048__li146091023142317"><strong id="dds_02_0048__b142912221031">DB_HOST</strong> indicates the IP address of the remotely connected DB instance. Obtain the value from the <span class="uicontrol" id="dds_02_0048__uicontrol5304228313"><b>EIP</b></span> column in the node list on the <span class="uicontrol" id="dds_02_0048__uicontrol19311220315"><b>Connections</b></span> page.</li><li id="dds_02_0048__li2508131610233"><strong id="dds_02_0048__b105259251235">DB_PORT</strong> indicates the port number. Obtain the value from <span class="uicontrol" id="dds_02_0048__uicontrol10525112517316"><b>Database Port</b></span> in the <span class="uicontrol" id="dds_02_0048__uicontrol2052720252314"><b>Basic Information</b></span> area on the <strong id="dds_02_0048__b1652712259319">Connections</strong> page.</li><li id="dds_02_0048__li4353171443514"><strong id="dds_02_0048__b135351419352">DB_HOST</strong> and <strong id="dds_02_0048__b17353121413357">DB_PORT</strong> can also be obtained from the <strong id="dds_02_0048__b3573345201017">Node Information</strong> area on the <strong id="dds_02_0048__b18783184915101">Basic Information</strong> page.</li><li id="dds_02_0048__li2512016202314"><strong id="dds_02_0048__b64721271838">DB_USER</strong> indicates the database account name. The default value is <strong id="dds_02_0048__b164731027734">rwuser</strong>.</li><li id="dds_02_0048__li1937943683118"><strong id="dds_02_0048__b1937912365315"><em id="dds_02_0048__i1837915364315">&lt;password&gt;</em></strong> indicates the password of the database account. If the password contains at signs (@),exclamation marks (!), or percent signs (%), replace them with hexadecimal URL codes %40, %21, and %25 respectively.</li><li id="dds_02_0048__li5466638153119">If user inputs this command then the password will be stored in logfiles and can be found in linux history, and in process list. So please note that plaintext passwords are risky.</li></ul>
</div></div>
<ul id="dds_02_0048__ul106082418273"><li id="dds_02_0048__li45912247273">Connect to the instance using standard parameters. The following is an example command:<p id="dds_02_0048__p1138102682712"><a name="dds_02_0048__li45912247273"></a><a name="li45912247273"></a><strong id="dds_02_0048__b85912412716">mongo --host 192.168.1.6 --port 8635 -u rwuser -p --authenticationDatabase admin</strong></p>
</li><li id="dds_02_0048__li35911241274">Connect to the DB instance using standard URI format. The following is an example command:<p id="dds_02_0048__p43699277273"><a name="dds_02_0048__li35911241274"></a><a name="li35911241274"></a><strong id="dds_02_0048__b6128732153717">mongo</strong> <strong id="dds_02_0048__b012812320375">mongodb://rwuser:&lt;password&gt;@</strong><strong id="dds_02_0048__b145952420279">192.168.1.80:8635</strong><strong id="dds_02_0048__b95942410270">/test?authSource=admin</strong></p>
</li></ul>
</p></li><li id="dds_02_0048__en-us_topic_0085335422_li2356085813016"><span>Check the connection result. If the following information is displayed, the connection is successful.</span><p><pre class="screen" id="dds_02_0048__en-us_topic_0085335422_screen141854665519">replica:PRIMARY&gt;</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_02_0077.html">Connecting to a Single Node Instance Over Public Networks</a></div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More