Skip to main content

Public floating IP address in a PostgreSQL for 1C cluster

Public floating IP addresses are static IP addresses that can be attached to cluster nodes in a private network to configure access to them from the internet. A separate address is attached to each cluster node.

An address is considered floating (Floating IP) because it can automatically switch when a role changes from replica to master and vice versa. When switching, the address is not changed or deleted.

To connect a public floating IP address, a cloud router with internet access is used. The public floating IP address is associated with the private IP address of the cluster node. Incoming traffic is processed by the cloud router — the router performs 1:1 NAT via an external IP address allocated when connecting the router to the internet. Incoming traffic can be filtered using a cloud firewall or a security group.

You can attach a public floating IP address:

If necessary, you can disconnect the public floating IP address.

Private subnet requirements for attaching a public floating IP address

  • the subnet must have a cloud router with an internet connection;
  • the IP address of the cloud router must be the default gateway in the cluster subnet.

If the router is already connected to the cluster subnet, but its IP address does not match the gateway, you will not be able to connect a public floating IP address. In this case, disconnect the subnet from the cloud router, and then connect it again and specify the subnet gateway address.

Prepare a private subnet for attaching a public floating IP address

  1. Create a cloud router with internet access.
  2. Connect a private subnet to the cloud router.

1. Create a cloud router with an internet connection

  1. In the control panel, in the top menu, click Products and select Cloud Servers.
  2. Go to Network → Cloud Routers.
  3. Click Create router.
  4. Select the location where the cloud router will be created.
  5. Select the router type.
  6. Enter the router name.
  7. Select the Connect router to the internet checkbox — a public IP address will be allocated for the router.
  8. Click Create.

2. Connect a private subnet to the cloud router

  1. In the control panel, in the top menu, click Products and select Cloud Servers.
  2. Go to Network → Cloud Routers.
  3. Open the router card.
  4. Click Connect subnet.
  5. Select a private subnet.
  6. Optional: enter the router IP address. If you do not specify an IP address, it will be automatically selected from the available subnet addresses. The cloud router IP address must match the default gateway of the private subnet. You can view the gateway in the control panel: in the top menu, click Products → Cloud Servers → Network → Private Networks tab → network page → Subnets tab → subnet card → Automatic network settings section → Subnet gateway.
  7. Click Connect.

Attach a public floating IP address to an existing cluster

  1. In the control panel, in the top menu, click Products and select Cloud Databases.

  2. Go to the Active tab.

  3. Go to the database cluster page → the Settings tab.

  4. In the Node addresses and statuses block, in the node line, click Connect public IP.

  5. If the cluster subnet meets the requirements, click Connect.

  6. If the cluster subnet does not meet the requirements:

    6.1.Select an existing cloud router or create a new one. The cluster subnet will be connected to the router. If you select an existing router without internet access or a new router, it will be automatically connected to the internet.

    6.2.Click Connect router and address.

Detach a public floating IP address

  1. In the control panel, in the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the database cluster page → Settings tab.
  4. In the Node addresses and statuses section, in the node row, click .
  5. Click Delete.