- Print
- PDF
DB Server
- Print
- PDF
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Available in VPC
In DB server, you can create or delete Cloud MongoDB servers, as well as check the list of MongoDB servers in operation. In addition, you can also change the specifications of the MongoDB servers in operation or manage admin (User) accounts.
DB server page
The basics of using DB server are as follows:
Area | Description |
---|---|
① Menu name | Name of the menu currently being viewed and the number of MongoDB servers in operation |
② Basic features | Create MongoDB server, check details of Cloud DB for MongoDB, refresh DB server page |
③ Post-creation features | Restart, delete, monitor, and manage MongoDB servers in operation |
④ MongoDB server list | Check the list of MongoDB servers in operation and their information |
⑤ Search | Search the desired server by service name from the MongoDB server list |
Checking MongoDB server list
You can check the information of each server from the list of MongoDB servers that have been created and are in operation. To check the information, take the following steps:
You can view the list only when there are 1 or more servers in operation. If you do not have any servers created and operating, no list appears on the DB server page.
In the VPC environment of NAVER Cloud Platform console, click Services > Database > Cloud DB for MongoDB in order.
Click the DB Server menu.
If the list of created MongoDB servers appears, check the summary information or click a MongoDB server to check the details.
- DB Service name: a group of MongoDB clusters under the MongoDB service name
- Cluster role: roles of the MongoDB cluster
- DB Server name: name of the MongoDB server
- DB Role/Role: roles of the MongoDB server
- DB Server type: type of the MongoDB server and its available memory
- Monitoring: go to the monitoring page
- DB Status: directs to the view DB server details page
- DB access port: port number being used by the MongoDB server
- Private domain: information of the private domain
- Public domain: information of public domain
- Data storage: size of the data storage in use (available capacity)
- Data storage type: type of data storage in use
- Data storage capacity: available capacity and used capacity of the data storage in use
- Status: status of the MongoDB server
- Creating: status in which the MongoDB server is being created with the information entered by the user
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Running: status in which the creation and configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application server is available
- Deleting: status in which the MongoDB server created is being deleted with the information entered by the user
- Stopping: status in which the MongoDB server created is being stopped with the information entered by the user
- Restarting: status in which the MongoDB server created is being restarted with the information entered by the user
- Created date: date when the MongoDB server was created, the initial point when the server entered "creating" status
- Running date: date when the MongoDB server started running, the initial point when the server entered "running" status
- ACG: ACG name and ID used in the MongoDB server
: click to go to the Server > ACG page
- [View rules]: click to display the detailed rules applied
- DB engine version: information of the MongoDB version installed on the server
- Cluster Type: type of the MongoDB cluster
- Replica set (shard) name: name of the replica set (shard)
- VPC: VPC name used in the MongoDB server
- Subnet: name of the Subnet being used by the MongoDB server
- Backup storage period (backup time): the configured backup file storage period and backup cycle, if the backup function is enabled
: click to enable or disable backup or set the file retention period and backup cycle
If you clear the backup, all existing backup files are deleted.
The differences between sharding and single replica set are as follows:
- In single replica set, the client directly accesses the DB server to perform data read/write.
- In sharding, the client accesses the router server called mongos and performs necessary data read/write tasks through mongos, and transfers the results to the client. Sharding consists of n shards, and each shard is configured in the same way as single replica set.
Creating MongoDB server
To create a MongoDB server in NAVER Cloud Platform console, take the following steps:
In the VPC environment of NAVER Cloud Platform console, click Services > Database > Cloud DB for MongoDB in order.
Click the DB Server menu.
Click [Create DB Server].
When the service subscription page appears, take the following steps in order:
Click [Subscribe] in NAVER Cloud Platform portal’s Services > Database > Cloud DB for MongoDB to go directly to the page in Step 3.
1. Set cluster
To set the information for the MongoDB cluster to be installed, take the following steps:
When the set cluster page appears, check the type of DBMS you want to install to the server from DBMS type.
Select the server generation.
Select the MongoDB version you want to install.
Select the type of the MongoDB cluster.
- Stand Alone: supports configuration for test and development environment
- Single replica set: a mongod process group that maintains the same data set and provides high availability
- Sharding: a configuration that distributes the storage of data in multiple replica sets
- The settings can't be changed after you create the MongoDB server
Set the rest of the items required when you create the MongoDB server.
- DB Server Name: enter the name of the MongoDB server
- The name must be 3-15 characters long and can only include English letters, numbers, and hyphens (-)
- Duplicate names are not allowed
- Random text will be added to avoid duplicate host names.
- DB Service Name: enter the Group name of the MongoDB server
- The name must be 3-15 characters long and can only include Korean letters, English letters, numbers, and hyphens (-)
- Duplicate names are not allowed
- VPC: select the VPC to use to create the server and MongoDB
- [Refresh]: click to view the latest version of the VPC list
- [Create VPC]: click if you don't haven't created any VPCs and need to create one
- Subnet: select a Private Subnet to be used when accessing VPC
- [Create Subnet]: click if you want to see the latest version of the created Subnet list
- Data storage type: click to select the storage type for saving DB data, between SSD and HDD
- The settings can't be changed after you create the MongoDB server
- Data storage capacity: check the storage capacity for saving DB data
- 10 GB is allocated upon initial creation of the MongoDB server
- The capacity is automatically added in 10 GB units and charged as data increases
- Supports up to 2000 GB
- DB Server Name: enter the name of the MongoDB server
Check the applicable pricing plan information when using Cloud DB for MongoDB.
- Pricing plan: an hourly pricing plan, which is billed based on the hours used, is applied by default, and it is changed according to the server specifications and storage capacity
- For more information, click pricing information
Check the MongoDB version and license information.
Specify the ACG settings for the MongoDB server access.
- Access Control Group (ACG) is created automatically
- The detailed settings for the ACG are available from Server > ACG in the console
Click [Next].
2. Set server
To set the information for MongoDB server to be installed, take the following steps:
When the set server page appears, set items required to create the MongoDB server.
- If you've selected Stand-alone for the cluster type, then set the following items:
- Stand-Alone Server Spec: select the specifications for the stand-alone server
- port: enter the port number for the Stand-alone server between 10000-65535
- Default: 17017
- The default MongoDB port number of "27017" is not recommended due to security vulnerabilities
- If you've selected single replica set for the cluster type, then set the following items:
- Number of members per replica set (primary & secondary): select the number of member servers in each shard (3 to 7 including the arbiter server)
- Member Server Spec: select the specifications for the member servers
- Number of arbiters per replica set: select the number of arbiter servers per shard (0-1 unit)
- In clusters consisting of primary - secondary - arbiter, when there is a replication delay or failure in one secondary member, a request set as read concern: majority or write concern: { w: majority } will not respond (difficult to see the effect of server duplexing)
- In clusters with primary - secondary - arbiter configuration, it is recommended to set read concern: local, write concern: { w: 1, j: true }
- Avoid configuring primary - secondary - arbiter in the production environment
- Arbiter server spec: select the specifications for arbiter servers
- port: enter the port number for each server between 10000-65535
- Default: 17017
- The default MongoDB port number of "27017" is not recommended due to security vulnerabilities
- If you've selected sharding for the cluster type, then set the following items:
- Number of members per replica set (primary & secondary): select the number of member servers in each shard (3 to 7 including the arbiter server)
- Member Server Spec: select the specifications for the member servers
- Number of arbiters per replica set: select the number of arbiter servers per shard (0-1 unit)
- In clusters consisting of primary - secondary - arbiter, when there is a replication delay or failure in one secondary member, a request set as read concern: majority or write concern: { w: majority } will not respond (difficult to see the effect of server duplexing)
- In clusters with primary - secondary - arbiter configuration, it is recommended to set read concern: local, write concern: { w: 1, j: true }
- Avoid configuring primary - secondary - arbiter in the production environment
- Arbiter server spec: select the specifications for arbiter servers
- Number of shards: select the number of shards
- 2 or 3 can be selected upon initial installation
- Up to 5 shards can be added in the management page after installation
- If you need more than 5 shards, make an inquiry to customer support
- Number of Mongos (Router) Servers: select the number of mongos servers (2-5 units)
- Mongos Server Spec: select the specifications for the mongos servers
- Number of Config Servers: check the number of config servers (3 fixed units)
- Config Server Spec: select the specifications for the config servers
- port: enter the port number for each server between 10000-65535
- Default: 17017
- The default MongoDB port number of "27017" is not recommended due to security vulnerabilities
- If you've selected Stand-alone for the cluster type, then set the following items:
Click [Next].
3. Set DB
To set the information for the MongoDB to be installed, take the following steps:
- When the Set DB page appears, set items required to create the MongoDB server.
USER_ID: enter the account ID of the MongoDB server admin
- Enter 4 to 16 characters using English letters and numbers
- The first character must be an English letter
- You cannot use predefined reserved words
USER password: enter the account password of the MongoDB server admin
- The password must be 8-20 characters long and can only include English letters, numbers, and special characters, with at least 1 of each
- You cannot use special characters ` & + \ " ' / or spaces
DB Config settings: view the optimized basic settings provided by NAVER
DB Data Compress: select the data compression algorithm provided by MongoDB
- Using the default value is recommended
Collect DB log: view the provision of log collection and viewer functions for error logs and slow query logs
- Cloud Log Analytics integrations
- Set whether to use backup for the server.
- Backup file retention period: click and select the period to store the backup file in a separate backup storage
- For point-in-time recovery, the backup file is stored for the maximum set retention period + 24 hours.
- Backup time: select the backup execution time
- The backup is performed once a day at the specified time using mongodump provided by MongoDB
- The backup is started every day within 15 minutes from the time specified by the user
- If you select this, additional fees will be incurred according to the storage capacity used
- Backup file retention period: click and select the period to store the backup file in a separate backup storage
- Click [Next].
- When the Request subscription to Cloud Log Analytics appears, view the content, and click [OK].
- If you need to subscribe to Cloud Log Analytics, click [Subscribe to Cloud Log Analytics]
- For more information on Cloud Log Analytics, see Cloud Log Analytics user guide
4. Final confirmation
- When the final confirmation page appears, check the configured cluster information and server information.
- Click [Previous] to edit the settings
- Click [Create].
- Check the status of the MongoDB created in the DB server page's MongoDB server list.
- Creating: status in which the MongoDB server is being created with the information entered by the user
- Configuring: status in which the MongoDB server is being created and configured with the information entered by the user
- Running: status in which the creation and configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
To view the latest status from step 3, click [Refresh].
It may take several minutes to tens of minutes for the status to turn from Creating to Configuring and then Operating to be available for use.
Restarting MongoDB server
You can easily and conveniently restart MongoDB servers. You can't access servers while they're being restarted. To restart, take the following steps:
- In the VPC environment of NAVER Cloud Platform console, click Services > Database > Cloud DB for MongoDB in order.
- Click the DB Server menu.
- Click the MongoDB server you want to restart, and then click [Restart].
- When the restart DB Server popup window appears, check the name of the DB server to restart, and then click [Yes].
- Check the status of the MongoDB server from the MongoDB server list in the DB server page.
- Stopping: status in which the MongoDB server is being stopped
- Restarting: status in which the MongoDB server is being restarted
- It may take a certain amount of time (minutes) until it enters the running status, when it is available for actual use, after going through the stopping and restarting statuses.
- The Role of the restarting server may cause a failover. You will be notified by SMS and email when a failover occurs.
Deleting MongoDB server
You can delete a MongoDB server that has been created and is in operation. If you're using the replica set or sharding type clusters, then all of the clusters are deleted together. If you're using the backup function, then the backup files are also deleted. To delete them, take the following steps:
- In the VPC environment of NAVER Cloud Platform console, click Services > Database > Cloud DB for MongoDB in order.
- Click the DB Server menu.
- Click the MongoDB server you want to delete and click [Delete DB Server].
- When the delete DB Server popup window appears, enter the name of the DB server to delete, and then click [Yes].
- Check the status of the MongoDB server from the MongoDB server list in the DB server page.
- Deleting: status in which the MongoDB server is being deleted
The actual deletion from the list after going through the deleting status may take a certain amount of time (minutes).
Monitoring MongoDB server
NAVER Cloud Platform's Cloud DB for MongoDB provides a monitoring service through the dashboards on each server. This allows you to intuitively check servers in operation and data status, and efficiently manage them.
For more information on monitoring, see Monitoring.
To go to the monitoring page of the MongoDB server that has been created and is in operation, take the following steps:
- In the VPC environment of NAVER Cloud Platform console, click Services > Database > Cloud DB for MongoDB in order.
- Click the DB Server menu.
- Click the MongoDB server you want to monitor, and then click [Monitoring].
- Click and select the dashboard you want to monitor.
Managing MongoDB server
While operating the created MongoDB server, you may need to change the options of the server or DB configured upon creation. Cloud DB for MongoDB supports changes or upgrades of a certain number of specifications simply through a few clicks, even for MongoDB servers that have already been created.
By default, managing a MongoDB server is available when the server status is running.
To manage a MongoDB server that has been created and is in operation, take the following steps:
- In the VPC environment of NAVER Cloud Platform console, click Services > Database > Cloud DB for MongoDB in order.
- Click the MongoDB server menu.
- Click the MongoDB server you want to manage, and then click [Manage DB].
- Click and select the item you want to manage.
Manage DB user
Cloud DB for MongoDB provides a user management feature that enables you to conveniently add, edit, and delete user accounts that use the server. You can add up to 10 user accounts at each time of creation, change, or deletion.
To add, edit, and delete user accounts, take the following steps:
- When the manage DB User popup window appears, perform the required tasks for the user account.
- Add user account: select Create, enter the information for USER_ID, database, DB permissions, and password, and then click [Add DB user]
- Delete user account: select Change/Delete, and then click [Delete] in the same row as the user account to be deleted
- Edit user account information: select Change/Delete in the same row as the user account to be modified, and then click [Edit] to edit, and click [Save]
- Click [Yes].
- Check the status of a MongoDB for which you've set users from the MongoDB list in the DB server page.
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
Manage admin user
When creating a MongoDB server, the ID and password for the server admin account are created by default. However, while operating the server, you may need to reset the password of the admin account.
To change the admin account password, enter the new password in the Admin user management popup window, and then click [Yes].
Change secondary
You can change the member server configuration of the replica set (shard), including the config server.
- The combined number of secondary and arbiter servers can be from a minimum of 3 to a maximum of 7, and only 1 arbiter server can be configured.
- The primary - secondary - arbiter configuration is not recommended, since it may cause service failures in special circumstances.
- When adding a secondary, the addition process is performed in the initial sync method provided by MongoDB, and it may require a considerable amount of time depending on the size of the existing data.
To change a secondary server, take the following steps:
- When the change secondary (arbiter) popup window appears, check the number of current secondary (arbiter) servers.
- Click and select the quantity you want to change to.
- Click [OK].
- Check the status of MongoDB for which you changed the secondary from the MongoDB list in the DB server page.
- Creating: status in which the MongoDB is being created with the information entered by the user
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
Add shards
You can add up to 5 shards within the MongoDB Service.
Since deleting shards may cause data loss, Cloud DB for MongoDB does not provide a shard deletion feature.
To add shards, take the following steps:
- When the add shards popup window appears, check the current number of shards.
- Click and select the number of shards you want to change to.
- Click [Yes].
- Check the status of a MongoDB that added shards from the MongoDB server list in the DB server page.
- Creating: status in which the MongoDB is being created with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
Change mongos
You can change the number of Mongos in the MongoDB Service. The number of Mongos can be configured from a minimum of 2 to a maximum of 5.
To change the number of Mongos, take the following steps:
- When the change number of Mongos popup window appears, check the current number of mongos servers.
- Click and select the number of mongos servers you want to change to.
- Click [OK].
- Check the status of a MongoDB for which you changed mongos count from the MongoDB list in the DB server page.
- Creating: status in which the MongoDB is being created with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
Change config server
You can change the number of Config server for the MongoDB Service. The number of config server can be from a minimum of 3 to a maximum of 7.
To change the number of Config server, take the following steps:
- When the change number of Config server popup window appears, view the number of Config server.
- Click and select the quantity you want to change to.
- Click [OK].
- Check the status of a MongoDB for which you changed the number of config servers from the MongoDB list in the DB server page.
- Creating: status in which the MongoDB is being created with the information entered by the user
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
Change DB specifications
You can change the server specifications for the MongoDB server you’ve created. Additional fees are incurred when applying specifications upgrades.
- The servers will restart when you change server specifications. As access is unavailable during the restart, it is recommended to view the data after the restart is completed.
- When you change the server specifications, the primary, secondary, and arbiter are all changed.
- When the primary server specification changes, a failover occurs and you will be notified by SMS and email.
To change the specifications, take the following steps:
- When the change DB specifications popup window appears, check the current server specifications.
- Click and select the server specifications you want to change to.
- Click [OK].
- Check the status of a MongoDB for which you changed specifications from the MongoDB list in the DB server page.
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Upgrading: status in which the MongoDB server is being upgraded with the information entered by the user
- Downgrading: status in which the MongoDB server is being downgraded with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
Manage public domain
You can allocate or remove public domains required for external access to MongoDB server.
Using public domains may cause security vulnerabilities, so configure limited access to the MongoDB server using methods such as ACG settings.
A temporary disruption may occur when allocating public domain in replica set cluster.
Editing of the host file is required for replica sets to access public domains.
Refer to create DB access string.
- When the manage public domain or remove public domain popup window appears, check the name of the DB server you'll allocate a public domain to or remove a domain from.
- Click [Yes].
- Check the status of a MongoDB for which you allocated or removed a public domain from the MongoDB list in the DB server page.
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
- The editing of the host file is required for replica sets.
See Create DB access string.
Primary DB Failover
If the primary MongoDB server fails, then the user can directly use the failover feature to stepdown the primary server. During the process of the primary being elected again, the primary may not exist for several seconds or longer, which may have an effect on services.
To stepdown the primary server, take the following steps:
- When the primary DB failover popup window appears, check the selected server and the shard number.
- Click [Yes].
- Check the MongoDB's DB role from the MongoDB list in the DB server page.
- Configuring: status in which the MongoDB server is being configured with the information entered by the user
- Running: status in which the configuration of the MongoDB server has been completed with the information entered by the user, and access to MongoDB from the application servers is available
MongoDB Engine Upgrade
You can upgrade the MongoDB version. The version upgrade is applied to the entire DB Service.
When the version is updated, a temporary disruption may occur due to a failover, and you will be notified by SMS and email.
In the case of that there is a sharding cluster, the upgrade proceeds one by one in the order of config -> shard -> mongos.
All replica sets (config and shard in replica set cluster and sharding cluster) are upgraded in the order of secondary/arbiter -> primary.
During the upgrade, the target server access is not available, and when upgrading the primary server, it is switched to secondary to keep service access to a minimum.
- Click DB management > Version upgrade.
- Select the version to upgrade and click [Yes].
- If a major version upgrade is required, you can select a higher major version by checking [Major version upgrade].
In the case that there is a sharding cluster, a version upgrade can be performed with the balancer turned off. If the balancer is turned on during the version upgrade, halt the balancer temporarily and proceed with the operation. Turn off the balancer before the version upgrade and then turn it back on after the task is finished.
For details on how to set up a balancer, see MongoDB stopBalancer setup reference guide (English).
- For major version upgrades, configure the development environment in advance, and proceed with the application version compatibility review and function test sufficiently.
- After a version upgrade, restoration to the previous version is not available.
- If you perform [Restore Backup] after upgrading the version, even the backup copy before the upgrade will be restored to the upgraded version of the cluster. If you want to keep the backup of the previous version, save the backup copy separately through [Export Object Storage] within the backup storage period.
Create DB access string
You can create a sample of a string required for external access to MongoDB servers.
To create an access string, take the following steps:
- When the Create DB access string popup window appears, check the created string.
- Edit the client's host file to access a replica set through a public domain.
- You can access it using the access string after adding the viewed information to the hosts file.
- If the replica set is not using a public domain, you cannot view host file information.
- Click [OK].