HANA Communication Ports in case of HANA MDC and Non MDC


In Multiple Container System, Each tenant has dedicated ports and connections for SQL- and HTTP-based client communication, as well as internal communication


Different types communications are required to connect the database with the clients ,


Just as the name suggests ,


SQL Ports are used for SQL Requests that comes from DB Clients such e.g. Hana Studio Requests


HTTP ports are used for web requests e.g. XS engine requests


Internal Communication Ports are used when internal communications are required







The default HTTP ports are used in all cases, that is, 80<instance> (HTTP) and 43<instance> (HTTPS)..So all the HTTP/HTTPS request as you can see in the picture comes to the Internal web dispatcher


The internal Web Dispatcher of the SAP HANA system manages these incoming HTTP(S) requests. To allow applications to send requests to specific databases in a multiple-container system, every tenant database needs an alias host name.Alias host names are mapped to internal HTTP(S) ports so that incoming requests can be routed to the correct database


SQL ports directly connect to the Tenant Databases. 


As the name suggest internal communication ports are used for internal communication within tenant.


Lets dig in further to understand what these numbers mentioned would mean.

 

Example 1: Installation is done [MDC] and tenants are added

You install a new SAP HANA system in multiple-container mode. Then, you create three tenant databases. Each of these tenant databases has automatically assigned three port numbers, 

First tenants with port 3<instance>40—42,

Second tenant with ports 3<instance>43—45

Third tenants with port  3<instance>46—48.

In case you add an additional service to an instance then it will automatically take over the next port that is available

Example 2: Conversion of single container database to a multi container database

You convert a single-container system to a multiple-container system. This results in the automatic creation of one tenant database. This tenant database has the same port numbers as the original single-container system (i.e. the ports that were created for single container initially are retained and that is used for the first tenant that is created ): 

3<instance>03 (internal communication)

3<instance>15 (SQL)

 3<instance>08 (HTTP) 

Then, you add a second indexserver to the tenant database. It is automatically assigned port numbers 3<instance>40—42. Finally, you create a second tenant database. It is automatically assigned ports the next three available port numbers: 3<instance>43—45.


These port numbers can be customized and can be checked using below command


System privilege DATABASE ADMIN or CATALOG READ is required to read the M_SERVICES system view and using any user with these privileges you can check the ports that are used


From Tenant Database:


SELECT SERVICE_NAME, PORT, SQL_PORT, (PORT + 2) HTTP_PORT FROM SYS.M_SERVICES WHERE ((SERVICE_NAME='indexserver' and COORDINATOR_TYPE= 'MASTER') or (SERVICE_NAME='xsengine'))


From System Database:

SELECT DATABASE_NAME, SERVICE_NAME, PORT, SQL_PORT, (PORT + 2) HTTP_PORT FROM SYS_DATABASES.M_SERVICES WHERE DATABASE_NAME='' and ((SERVICE_NAME='indexserver' and COORDINATOR_TYPE= 'MASTER') or (SERVICE_NAME='xsengine'))


Note:


  • The port number of the system database are fixed: 3<instance>01 (internal), 3<instance>13 (SQL), and 3<instance>14 (HTTP).

  • There are no standard port number assignments. Admin can make a choice for few.

  • Port numbers are assigned automatically from the available port number range according to availability at the time the database is created or a service is added.

  • Administrators can also explicitly specify which port numbers to use when they create a tenant database or add a service.

  • The default port number range for tenant databases is 3<instance>40—3<instance>99. This means that the maximum number of tenant databases that can be created per instance is 20. However, you can increase this by reserving the port numbers of further instances. You do this by configuring the property [multidb] reserved_instance_numbers in the global.ini file. The default value of this property is 0. If you change the value to 1, the port numbers of one further instance are available (for example, 30040—30199 if the first instance is 00). If you change it to 2, the port numbers of two further instances are available (for example, 30040—30299 if the first instance is 00).


Read more :


SAP DOCUMENTATION


Configure HTTP(S) Access to Multitenant Database Containers









Comments