Choosing an access method

Content Platform Tenant Management Help

File Size
4269 KB
Part Number

You can access the HCP system through the management API by specifying either a hostname or an IP address in the resource URL. If the system uses DNS and you specify a hostname, HCP selects the IP address for you from the currently available nodes. HCP uses a round-robin method to ensure that it doesn’t always select the same address.

When you specify IP addresses, your application must take responsibility for balancing the load among the nodes. In this case, you risk trying to connect (or reconnect) to a node that is not available. However, using explicit IP addresses to connect to specific nodes can sometimes have advantages over using hostnames.

These considerations apply when deciding which method to use:

  • If the client uses a hosts file to map HCP hostnames to IP addresses, the client system has full responsibility for converting any hostnames to IP addresses. Therefore, HCP cannot spread the load or prevent attempts to connect to unavailable nodes.
  • If the client caches DNS information, connecting by hostname may result in the same node being used repeatedly.
  • When you access the HCP system by hostname, HCP ensures that requests are distributed among the nodes, but it does not ensure that the resulting loads on the nodes are evenly balanced.
  • When multiple applications access the HCP system by hostname concurrently, HCP is less likely to spread the load evenly across the nodes than with a single application.
Note: When using hostnames, you can ping the HCP system periodically to check whether you’re getting connections to different nodes.