Knowledgebase

Rcs Managed Databases for FerretDB Reference Guide Print

  • 0

Introduction

Rcs Managed Databases for FerretDB allows you to use MongoDB drivers seamlessly with PostgreSQL as the database backend. With FerretDB, users can run the same MongoDB protocol queries without needing to learn a new language or command. FerretDB turns PostgreSQL into a MongoDB-compatible document database. FerretDB on Rcs enables developers and businesses to deploy a fully open-sourced MongoDB alternative.

This reference guide for managed FerretDB covers all the essential information you need to administer and use your database. This guide assumes you've already deployed a FerretDB managed database by following our Quickstart guide and want to learn more.

To get started, navigate to the Databases section in the Rcs Customer Portal. Then, click your deployed database to open the administration area containing several tabs.

Overview Tab

The overview tab consists of the following sections:

Real-Time Usage Statistics

The Real-time usage statistics section includes details about your Rcs Managed Database resource usage. Depending on your deployment type, these statistics include the real-time vCPU usage and Network Usage graphs together with the Current Charges billed to your Rcs Account.

Rcs Managed Database for FerretDB and PostgreSQL real-time usage

FerretDB Connection Details

Use the FerretDB Connection Details to connect to the FerretDB database layer to perform MongoDB operations on your target database. This section includes the following connection information:

  • username: The default managed database administrative username vultradmin to use for connecting to the database.
  • password: A plain auto-generated password assigned to the vultradmin user. Click the Eye (Show Password) symbol to reveal and copy the password characters.
  • host: The unique host URL you can use to connect and access the FerretDB database layer.
  • port: The managed database port you can use to connect to the database. By default, it's set to the MongoDB port value 27071.

Rcs Managed Database FerretDB details

In addition, you can use the following clickable elements:

  • Copy Connection String: Use this button to copy the direct connection string to access your FerretDB database interface using the mongsh CLI tool. A connection string looks like the one below:

      mongosh "mongodb://vultradmin:PASSWORD@vultr-.vultrnosql.com:27017/ferretdb?authMechanism=PLAIN"
  • Copy FerretDB URL: The direct MongoDB connection URL you can embed in your application or access tool to start a FerretDB database session.The managed database FerretDB URL looks like the one below:

      mongodb://vultradmin:PASSWORD@vultr-.vultrnosql.com:27017/ferretdb?authMechanism=PLAIN

PostgreSQL Connection Details

Use the PostgreSQL Connection Details section information to access your main PostgreSQL database cluster. The connection details include the following information:

  • Databases/Pools: Sets your target database or pool from the list of available cluster resources to display in your details and connection string. If you have multiple databases, click the dropdown field to set your target database.
  • Users: Sets the target managed database user to display in your connection details and connection string.
  • username: The managed database user you can use to access the PostgreSQL cluster. By default, the vultradmin user unless selected from the Users dropdown.
  • password: The auto-generated plain password you can use to access the PostgreSQL database. Click the Eye Show Password symbol to reveal and copy the user password.
  • host: A unique PostgreSQL host URL you can use to access your cluster.
  • port: The PostgreSQL database port.
  • database: The available PostgreSQL database the user can access. By default defaultdb, unless you change it using the Database/Pools dropdown.

Managed Database PostgreSQL Connection Details

In addition, the following direct link elements to access the database cluster:

  • Copy Connection String: Click this button to copy the direct PostgreSQL string you can use to access the database cluster using psql. A connection string looks like the one below:

      psql postgres://vultradmin:PASSWORD@vultr-prod-8c01.vultrdb.com:16751/defaultdb
  • Copy PostgreSQL URL: Click this button to copy the PostgreSQL database URL you can apply to your applications or any other access tool. A PostgreSQL URL looks like the one below:

      postgres://vultradmin:APASSWORD@vultr-prod-8c01.vultrdb.com:16751/defaultdb
  • Download Signed Certificate: To set up secure TLS/SSL access to your PostgreSQL database using your application or client tool, click this button to download the cluster certificate file.

General Information

The General Information section includes details about your Rcs Managed Database cluster billing and backend structure. It has the following two editable fields:

  • Label: The descriptive name for your managed database cluster. To rename the cluster, click the Edit symbol next to the field value to rename your cluster.
  • Tag: A unique tag name to identify your managed database cluster. Click the [Click here to set] value to set up a new tag for your cluster.

Rcs Managed Database for FerretDB and PostgreSQL General Information

VPC Network

Rcs Private Cloud (VPC) is a private network that allows you to different infrastructure resources to the same logical network. Click the VPC drop-down to attach your database cluster to a Rcs VPC of your choice. When attached:

  • Click Update to attach your managed database cluster to the VPC

    Attach a Rcs Managed Database for FerretDB and PostgreSQL to a Rcs VPC

  • Verify that a new Ferret Private IP field with a unique private IPV4 address is added to your General Information section.

    Verify Managed Database VPC Address

  • Verify that a new public host value is added to your PostgreSQL Connection Details section.

  • Resources within the VPC can connect to the database cluster using either its unique IPv4 private network address or host URL values.

Trusted Sources

By default, your managed database accepts connection requests from all hosts on the internet. To restrict access to your database cluster, click the Edit button to enter a list of trusted IP addresses separated by a comma ,. Click Save to only allow connection requests from the trusted IPs.

Set Up Rcs Managed Databases for FerretDB and PostgreSQL Trusted Sources

Actions

The Actions section includes the following administrative options:

  • Fork Database Cluster: Creates a separate copy of your managed database with the same values, schema, and table data from your latest backup. When you fork a database cluster, you can change the number of nodes, type, and location of the new cluster.

    Fork a Rcs Managed Database for FerretDB and PostgreSQL

  • Restore from Backup: Creates a new cluster from your existing managed database backups. When you restore your cluster from a backup, a new cluster is created without stand-by or read-only nodes. You can either choose Latest Backup or Choose a Point in time – Timezone (UTC) to restore your existing database to a new cluster in the same location with the exact number of nodes and type.

    Restore a Rcs Managed Database for FerretDB and PostgreSQL from Backup

  • Add Read-Only Replica Node: Sets up a new replica node in another Rcs location to improve your database cluster redundancy and fault tolerance rate.

    Add Rcs Managed Database Read Only Replica

Connect to the Database

To connect to a Rcs Managed Database for FerretDB and PostgreSQL, you can either use the mongosh or psql CLI tools. Using mongosh, you can run MongoDB operations on your database, while psql allows you to run PostgreSQL queries and verify the converted schema.

  • mongosh

      $ mongosh 'mongodb://vultradmin:password@vultr-host-url:27017/ferretdb?authMechanism=PLAIN'
  • psql

      $ psql -h vultr-host-url -U vultradmin -d defaultdb

Resources

Contains links to useful resources to documentation and support for your managed database.

Usage Graphs Tab

You can monitor your managed database cluster backend infrastructure performance in this tab. Click the Range: dropdown to view your desired cluster performance report. Available values include 24 hours, Last Week, and Last Month

Rcs Managed Database for FerretDB and PostgreSQL Usage Graphs

When selected, usage information about your underlying cluster infrastructure vCPU Usage, Disk Operations, and Network performance displays in the respective sections.

Queries & Logs Tab

This tab includes information about your running database queries, statistics, and operation logs. Using this tab, you can keep track of any continuous logs and view the SQL queries that run on your databases. Click the Refresh buttons on each section to reload and view more updated data.

View Managed Database Queries and Logs

Users & Databases Tab

You can create new users, manage existing users, and available databases in this tab. By default, a cluster includes the vultradmin and defaultdb values. You cannot change the administrative vultradmin username, but you can reset the password to your desired value. The defaultdb value is the PostgreSQL database that must exist and cannot be deleted from your cluster.

Rcs Managed Database Users & Databases Tab

To set up a new PostgreSQL database user, click the Add New User button within the Users section. When prompted, enter a new Username and Password to assign the new database user.

Rcs Managed Database Add new User Dialog Prompt

To set up a new PostgreSQL database, click the Add New Database button within the Databases section. When prompted, enter your desired value in the Database Name field and click Add Database to save the new database.

Set Up a new Rcs Managed Database within a cluster

Connection Pools Tab

PostgreSQL connection pooling allows you to run a large number of concurrent database connections while minimizing the cluster’s resource usage. Rcs Managed Databases for FerretDB and PostgreSQL support connection pooling using the PgBouncer tool.

Rcs Managed Databases for FerretDB and PostgreSQL Connection Pools tab

The Connection Pools tab allows you to set up and manage all cluster pools. Using PgBouncer, client queries are managed and only a limited amount of backend connections are established which leads to lower cluster resource usage. Without a connection pooler, all requests are handled by the database backend process and each process matches a connection which leads to high resource usage.

To create a new connection pool:

  • Click the Add New Connection Pool within the Connection Pools section.

  • When prompted, enter your desired Pool Name, and select your target Database from the list of options.

  • Choose your target database User to grant the pool operations.

  • Select a Pool Mode:

    Create a new Rcs Managed Database Connection Pool

    • Transaction: Allows each client connection to take its turn using a backend connection to complete a single transaction. When complete, the connection is returned to the pool for another client connection. This is the default and recommended pooling mode.
    • Session: Keeps a client connection open until the client sends a disconnect request to the pooler. This creates a waiting queue for incoming client connections.
    • Statement: It’s similar to transaction pooling and cycles the server-side connections after each database statement instead of allowing a full transaction to run. Multiple SQL statements are not supported in this mode.
  • In the Size field, enter your desired maximum number of simultaneous connections allowed to the pool. The recommended value range is 20 and you can scale the pool depending on your application needs.

  • Click Create Pool to save the new connection pool.

Migration Tab

The migration tab allows you to transfer your existing PostgreSQL database from your previous host to the managed database cluster. This is important when moving large databases to a Rcs Managed Database. For more information, visit the managed database migration guide.

Settings Tab

The Settings tab allows you to manage your backend cluster operations. Below are the available options:

  • Upgrade Window: Sets your desired day and time of the week when the managed database should update to the newest version. By default, it’s set to Sunday, 7 AM (UTC)

    Rcs Managed Database Settings

  • Maintenance Updates: Displays scheduled maintenance updates on your database cluster.

  • Upgrade Version: Upgrades your database cluster to a newer version.

  • Time Zone: Sets your default managed database timezone necessary for reporting and cluster operations.

  • Advanced Configuration: Allows you to set custom advanced configurations for your managed database cluster.

  • Available Extensions: Displays a list of activated PostgreSQL extensions, you can choose to deactivate any extension using the following syntax in your psql session.

      => DROP EXTENSION extension_name;
  • Change Plan: Allows you to scale up your managed database cluster and change the backend server type to match your needs. Downscaling to lower plans is not supported.

  • Datacenter Location: Allows you to change your managed database location to a new Rcs location. This process requires some time depending on the size of your database cluster.

  • Delete Managed Database: Permanently destroys your Rcs Managed Database cluster. When destroyed, you cannot recover any database information.

Frequently Asked Questions

Do I run MongoDB operations directly using FerretDB?

Yes, you can run MongoDB operations and actions directly in your FerretDB session. The default MongoDB syntax and operations structure is supported in the FerretDB session using mongosh, but not your PostgreSQL session.

Can I connect a MongoDB-powered application to a Rcs Managed Database for FerretDB and PostgreSQL?

Yes, you can connect your MongoDB-powered application to the managed database using the FerretDB URL displayed in your FerretDB Connection details section.

How does the Rcs Managed Database for FerretDB and PostgreSQL manage to accept MongoDB operations?

FerretDB works as the main MongoDB access interface and maps all data to the backend PostgreSQL database. This enables dual database functionality for the Rcs Managed Database for FerretDB and PostgreSQL allowing you to carry out any MongoDB operations.

Is the Rcs Managed Database Backed Up? And recoverable to a specific point in time?

All Rcs Managed Databases are automatically backed up. You can recover a specific backup copy of your managed database by clicking the Restore from Backup option in the Actions section. When prompted, choose your point in time based on your database timezone.

More Resources

To further explore Rcs Managed Databases, visit the following resources:

Introduction Rcs Managed Databases for FerretDB allows you to use MongoDB drivers seamlessly with PostgreSQL as the database backend. With FerretDB, users can run the same MongoDB protocol queries without needing to learn a new language or command. FerretDB turns PostgreSQL into a MongoDB-compatible document database. FerretDB on Rcs enables developers and businesses to deploy a fully open-sourced MongoDB alternative. This reference guide for managed FerretDB covers all the essential information you need to administer and use your database. This guide assumes you've already deployed a FerretDB managed database by following our Quickstart guide and want to learn more. To get started, navigate to the Databases section in the Rcs Customer Portal. Then, click your deployed database to open the administration area containing several tabs. Overview Tab The overview tab consists of the following sections: Real-Time Usage Statistics The Real-time usage statistics section includes details about your Rcs Managed Database resource usage. Depending on your deployment type, these statistics include the real-time vCPU usage and Network Usage graphs together with the Current Charges billed to your Rcs Account. FerretDB Connection Details Use the FerretDB Connection Details to connect to the FerretDB database layer to perform MongoDB operations on your target database. This section includes the following connection information: username: The default managed database administrative username vultradmin to use for connecting to the database. password: A plain auto-generated password assigned to the vultradmin user. Click the Eye (Show Password) symbol to reveal and copy the password characters. host: The unique host URL you can use to connect and access the FerretDB database layer. port: The managed database port you can use to connect to the database. By default, it's set to the MongoDB port value 27071. In addition, you can use the following clickable elements: Copy Connection String: Use this button to copy the direct connection string to access your FerretDB database interface using the mongsh CLI tool. A connection string looks like the one below: mongosh "mongodb://vultradmin:PASSWORD@vultr-.vultrnosql.com:27017/ferretdb?authMechanism=PLAIN" Copy FerretDB URL: The direct MongoDB connection URL you can embed in your application or access tool to start a FerretDB database session.The managed database FerretDB URL looks like the one below: mongodb://vultradmin:PASSWORD@vultr-.vultrnosql.com:27017/ferretdb?authMechanism=PLAIN PostgreSQL Connection Details Use the PostgreSQL Connection Details section information to access your main PostgreSQL database cluster. The connection details include the following information: Databases/Pools: Sets your target database or pool from the list of available cluster resources to display in your details and connection string. If you have multiple databases, click the dropdown field to set your target database. Users: Sets the target managed database user to display in your connection details and connection string. username: The managed database user you can use to access the PostgreSQL cluster. By default, the vultradmin user unless selected from the Users dropdown. password: The auto-generated plain password you can use to access the PostgreSQL database. Click the Eye Show Password symbol to reveal and copy the user password. host: A unique PostgreSQL host URL you can use to access your cluster. port: The PostgreSQL database port. database: The available PostgreSQL database the user can access. By default defaultdb, unless you change it using the Database/Pools dropdown. In addition, the following direct link elements to access the database cluster: Copy Connection String: Click this button to copy the direct PostgreSQL string you can use to access the database cluster using psql. A connection string looks like the one below: psql postgres://vultradmin:PASSWORD@vultr-prod-8c01.vultrdb.com:16751/defaultdb Copy PostgreSQL URL: Click this button to copy the PostgreSQL database URL you can apply to your applications or any other access tool. A PostgreSQL URL looks like the one below: postgres://vultradmin:APASSWORD@vultr-prod-8c01.vultrdb.com:16751/defaultdb Download Signed Certificate: To set up secure TLS/SSL access to your PostgreSQL database using your application or client tool, click this button to download the cluster certificate file. General Information The General Information section includes details about your Rcs Managed Database cluster billing and backend structure. It has the following two editable fields: Label: The descriptive name for your managed database cluster. To rename the cluster, click the Edit symbol next to the field value to rename your cluster. Tag: A unique tag name to identify your managed database cluster. Click the [Click here to set] value to set up a new tag for your cluster. VPC Network Rcs Private Cloud (VPC) is a private network that allows you to different infrastructure resources to the same logical network. Click the VPC drop-down to attach your database cluster to a Rcs VPC of your choice. When attached: Click Update to attach your managed database cluster to the VPC Verify that a new Ferret Private IP field with a unique private IPV4 address is added to your General Information section. Verify that a new public host value is added to your PostgreSQL Connection Details section. Resources within the VPC can connect to the database cluster using either its unique IPv4 private network address or host URL values. Trusted Sources By default, your managed database accepts connection requests from all hosts on the internet. To restrict access to your database cluster, click the Edit button to enter a list of trusted IP addresses separated by a comma ,. Click Save to only allow connection requests from the trusted IPs. Actions The Actions section includes the following administrative options: Fork Database Cluster: Creates a separate copy of your managed database with the same values, schema, and table data from your latest backup. When you fork a database cluster, you can change the number of nodes, type, and location of the new cluster. Restore from Backup: Creates a new cluster from your existing managed database backups. When you restore your cluster from a backup, a new cluster is created without stand-by or read-only nodes. You can either choose Latest Backup or Choose a Point in time – Timezone (UTC) to restore your existing database to a new cluster in the same location with the exact number of nodes and type. Add Read-Only Replica Node: Sets up a new replica node in another Rcs location to improve your database cluster redundancy and fault tolerance rate. Connect to the Database To connect to a Rcs Managed Database for FerretDB and PostgreSQL, you can either use the mongosh or psql CLI tools. Using mongosh, you can run MongoDB operations on your database, while psql allows you to run PostgreSQL queries and verify the converted schema. mongosh $ mongosh 'mongodb://vultradmin:password@vultr-host-url:27017/ferretdb?authMechanism=PLAIN' psql $ psql -h vultr-host-url -U vultradmin -d defaultdb Resources Contains links to useful resources to documentation and support for your managed database. Usage Graphs Tab You can monitor your managed database cluster backend infrastructure performance in this tab. Click the Range: dropdown to view your desired cluster performance report. Available values include 24 hours, Last Week, and Last Month When selected, usage information about your underlying cluster infrastructure vCPU Usage, Disk Operations, and Network performance displays in the respective sections. Queries & Logs Tab This tab includes information about your running database queries, statistics, and operation logs. Using this tab, you can keep track of any continuous logs and view the SQL queries that run on your databases. Click the Refresh buttons on each section to reload and view more updated data. Users & Databases Tab You can create new users, manage existing users, and available databases in this tab. By default, a cluster includes the vultradmin and defaultdb values. You cannot change the administrative vultradmin username, but you can reset the password to your desired value. The defaultdb value is the PostgreSQL database that must exist and cannot be deleted from your cluster. To set up a new PostgreSQL database user, click the Add New User button within the Users section. When prompted, enter a new Username and Password to assign the new database user. To set up a new PostgreSQL database, click the Add New Database button within the Databases section. When prompted, enter your desired value in the Database Name field and click Add Database to save the new database. Connection Pools Tab PostgreSQL connection pooling allows you to run a large number of concurrent database connections while minimizing the cluster’s resource usage. Rcs Managed Databases for FerretDB and PostgreSQL support connection pooling using the PgBouncer tool. The Connection Pools tab allows you to set up and manage all cluster pools. Using PgBouncer, client queries are managed and only a limited amount of backend connections are established which leads to lower cluster resource usage. Without a connection pooler, all requests are handled by the database backend process and each process matches a connection which leads to high resource usage. To create a new connection pool: Click the Add New Connection Pool within the Connection Pools section. When prompted, enter your desired Pool Name, and select your target Database from the list of options. Choose your target database User to grant the pool operations. Select a Pool Mode: Transaction: Allows each client connection to take its turn using a backend connection to complete a single transaction. When complete, the connection is returned to the pool for another client connection. This is the default and recommended pooling mode. Session: Keeps a client connection open until the client sends a disconnect request to the pooler. This creates a waiting queue for incoming client connections. Statement: It’s similar to transaction pooling and cycles the server-side connections after each database statement instead of allowing a full transaction to run. Multiple SQL statements are not supported in this mode. In the Size field, enter your desired maximum number of simultaneous connections allowed to the pool. The recommended value range is 20 and you can scale the pool depending on your application needs. Click Create Pool to save the new connection pool. Migration Tab The migration tab allows you to transfer your existing PostgreSQL database from your previous host to the managed database cluster. This is important when moving large databases to a Rcs Managed Database. For more information, visit the managed database migration guide. Settings Tab The Settings tab allows you to manage your backend cluster operations. Below are the available options: Upgrade Window: Sets your desired day and time of the week when the managed database should update to the newest version. By default, it’s set to Sunday, 7 AM (UTC) Maintenance Updates: Displays scheduled maintenance updates on your database cluster. Upgrade Version: Upgrades your database cluster to a newer version. Time Zone: Sets your default managed database timezone necessary for reporting and cluster operations. Advanced Configuration: Allows you to set custom advanced configurations for your managed database cluster. Available Extensions: Displays a list of activated PostgreSQL extensions, you can choose to deactivate any extension using the following syntax in your psql session. => DROP EXTENSION extension_name; Change Plan: Allows you to scale up your managed database cluster and change the backend server type to match your needs. Downscaling to lower plans is not supported. Datacenter Location: Allows you to change your managed database location to a new Rcs location. This process requires some time depending on the size of your database cluster. Delete Managed Database: Permanently destroys your Rcs Managed Database cluster. When destroyed, you cannot recover any database information. Frequently Asked Questions Do I run MongoDB operations directly using FerretDB? Yes, you can run MongoDB operations and actions directly in your FerretDB session. The default MongoDB syntax and operations structure is supported in the FerretDB session using mongosh, but not your PostgreSQL session. Can I connect a MongoDB-powered application to a Rcs Managed Database for FerretDB and PostgreSQL? Yes, you can connect your MongoDB-powered application to the managed database using the FerretDB URL displayed in your FerretDB Connection details section. How does the Rcs Managed Database for FerretDB and PostgreSQL manage to accept MongoDB operations? FerretDB works as the main MongoDB access interface and maps all data to the backend PostgreSQL database. This enables dual database functionality for the Rcs Managed Database for FerretDB and PostgreSQL allowing you to carry out any MongoDB operations. Is the Rcs Managed Database Backed Up? And recoverable to a specific point in time? All Rcs Managed Databases are automatically backed up. You can recover a specific backup copy of your managed database by clicking the Restore from Backup option in the Actions section. When prompted, choose your point in time based on your database timezone. More Resources To further explore Rcs Managed Databases, visit the following resources: Rcs Managed Databases Quickstart Rcs Managed Databases for MySQL Reference Guide Rcs Managed Databases for PostgreSQL Reference Guide Rcs Managed Databases for Redis Reference Guide

Was this answer helpful?
Back

Powered by WHMCompleteSolution