Endpoints: A Direct Connection to the Cloud

Note: This document is updated based on Jelastic version 3.3.

The Endpoints feature at Jelastic refers to the possibility of TCP/UDP ports mapping via the Shared Load Balancer, which is intended to simplify the instances’ collaboration with third-party tools and resources. This is achieved through providing users with the ability to establish a direct connection (over either raw TCP or UDP protocol) to the corresponding node, without the mandatory Public IP address attached.

Such linking can be used to enable a great variety of different tasks, like remote database management, direct apps’ deployment from IDE (for IIS), running multiple project copies on a single instance, accessing a server’s admin panel (e.g. for Smartfox) with no external address bound, etc.

Beside the increased convenience, with endpoints, trial users get access to a number of Jelastic features previously unavailable to them, while the billing users can save some money for external IPs usage (which, otherwise, would be required for such operations). Obviously, endpoints can’t completely replace them, but may become useful in some elementary jobs, and being combined with other Jelastic features (like automatic vertical and horizontal scaling, discounts tiers, etc) such an approach can help to cut the spends significantly.

To begin with, let’s consider some technical aspects of this feature implementation and the corresponding parameters, that are available at your JCA panel and need to be configured before proceeding further.

Endpoints Configuration via JCA

When a user adds a new endpoint, Jelastic randomly takes an available public port within the pool of Jelastic Shared Resolver’s ports and allocates it for the corresponding node. By default, the range of this pool stands for 10000-20000.

If you’d like to change this value, open your JCA > System Settings section, enable the Expert mode and state your custom range within the jpool > endpoint.public.ports.ranges parameter:

Do not forget to Apply the changes made using the same-named button above the settings’ list.

Once a port is assigned, the appropriate record appears at the Resolver’s database, for being consequently replicated to all its slaves, due to the statement-based replication. After that, a special trigger adjusts the iptables rules on the server, providing a user with a ready-to-work endpoint connection link (displayed within the Access URL field at the endpoints’ list).

The amount of custom endpoints, allowed to be added by a user, can also be controlled by a cluster admin with the environment.endpoint.count.per.node quota - it defines the maximum number of endpoints per each node:

This limit can be set either for a separate user or for a group of them.

Finally, in addition you can re-define the availability of the Endpoints’ option for your end-users (by default, this feature becomes available for all of them just after the platform upgrade to the 3.3 version). Its activation/deactivation is controlled by the environment.endpoint.enabled quota with the 1 or 0 value set respectively.

This permission can also be managed separately for a single user or for a group of them.

Now, let’s learn how to work with Jelastic endpoints through the dashboard. Below we’ll cover the most important points in their usage and examine a few simple use-case examples.

Endpoints Managing

The list of endpoints can be accessed via the environment Settings menu, that opens through selecting the same-named button for a particular environment.

Within the opened tab, switch to the Endpoints menu item. Now you can start working with your mapping’s list:

Adding Endpoints

To create a new endpoint, click the Add button from the top tools’ pane and fill in the appeared Add Endpoint form with the relevant data:

  • Node - select the instance you’d like to set the endpoint for (here only the comprised in the chosen environment nodes are displayed)
  • Name - either type the title for a new endpoint or choose one of the preconfigured options (the corresponding list is provided just down the page)
  • Private port - specify the preferred local node’s port to be used for mapping (it’s substituted automatically in case the predefined Name was selected)
  • Protocol - select either TCP or UDP

The rest of fields, i.e. Public port and Access URL, will be configured by Jelastic automatically.

Select Add when ready.

For more convenience, we provide the embedded list of predefined endpoint configurations, based on the protocol or purpose implied:

Connection NamePrivate Port
Remote Desktop3389

*Optional values availability depends on the type of the chosen node:

  • database nodes are provided with the default endpoint, named after themselves and with the appropriate port stated
  • Windows-based containers have the additional RDP (3389) connection
  • IIS application server has the DEPLOY (8172) connection for the direct project deployment from IDE

After the confirmation, you’ll see the new endpoint appeared in the list.

Here you’ll find the Public port and Access URL actual values already displayed. You can use these parameters to perform the needed operations - just click on a particular string to get the opportunity to easily copy it.

Note: that for linking functionality to work properly with the VPS and Docker® containers, the corresponding private ports (stated during the endpoint addition) at these nodes should be opened by the owner manually.

Edit/Remove Endpoint

Any existing endpoint can be easily edited or removed in case of further unnecessity. For that, just select the desired connection within the endpoints list and click the Edit (either use double-click on the required line) or Remove button, located at the tools’ pane above.

Depending on the option chosen, you’ll see the following:

  • Edit - in the appeared Edit Endpoint form (which is completely similar to the Add one) you can modify all the abovementioned settings except the Node choosing (as this makes no sense - you could just add a new similar endpoint to the necessary instance).

    Once the required changes are made, Apply them with the same-named button at the bottom of the frame.

  • Remove - the special pop-up frame will appear, where you need to confirm your decision:

    Just after that, the corresponding endpoint will be removed from the list.

Endpoints Use-Cases

Once the required mappings are configured, you can apply them for running different tasks - to make it easier to start, below we’ll describe a few most common endpoints’ use-cases that you can benefit from.

As an example, we will use an environment with the Apache application server and MySQL database (you can create the similar one following this guide):

Below we’ll discover how to use endpoints for:

Database Management

With endpoints, gaining remote access to your DB instance becomes pretty easy, as using this feature eliminates the necessity to acquire any additional options like a Public IP. To show this, we’ll consider two simple ways of performing this operation: through embedded OS terminal and third-party DB client.

Connection via Terminal

The most common approach is to use the built-in terminal of your local machine, as this does not require any additional installations or configurations and provides sufficient functionality for a simple connection establishment - just a single command is required:

mysql -h {host} -P {port} -u {user} -p


  • {host} - endpoint Access URL without the port suffix specified (node30292-env-with-endpoints.jelastic.com in our case)
  • {port} - public port number assigned (10011 in this example)
  • {user} - database user name (Jelastic has sent it to you via email during the environment creation - by default it stands for root for all the new MySQL servers)

After the connection validation, you’ll be requested for the appropriate DB user’s password (it can also be found in the abovementioned email) in order to access your database.

That’s all! Now you can start working with your database through executing the required SQL queries.

Connection via Local Client

In the case you require advanced functionality or if you are used to managing the data stored within your database with more convenience, a type of database desktop client may come in handy here. It will provide you with a user-friendly graphic interface and the variety of included features to accelerate your work.

For an example of such a client, that will help to establish the remote connection to our database through the created endpoint, we’ll use one of the most popular DB management tools - MySQL Workbench.

1. Run the abovementioned application and click the New Connection button.

2. In the appeared Setup New Connection frame, fill in the following fields at the top:

  • Connection Name - set an appellation for your connection (e.g. jelastic-db)
  • Connection Method - choose the Standard (TCP/IP) method

Then, specify the required DB data inside the Parameters tab beneath:

  • Hostname - endpoint URL without the port number specified at the end (node30292-endpoints.jelastic.com in our case)
  • Port - the endpoint’s public port (we got port 10011 assigned during its addition)
  • Username - name of the admin DB user (Jelastic has sent it to you via email during the environment creation - by default it stands for root for all the new MySQL servers)
  • Password - either click Store in Keychain to enter and save your pass (which can be found within the same email) or skip this field to specify it during each connection attempt
  • Default Schema - the database schema to be used by default (can be also left blank)

Click OK to complete.

3. Double-click on the newly appeared connection record to initiate its establishment and specify your password in the appeared frame (if you haven’t saved it before).

You can also tick Save password in keychain if you don’t want to enter it manually each time you need to access your database. Click the OK button to proceed.

4. In a minute, you’ll be connected to your DB.

Great! Now you can start organizing your data using all the provided benefits of the full-featured management client.

Just in the same way you can connect to any other database server within Jelastic or, for example, backup and restore your data within dump files.

Multiple Development Stages at a Single App Server

Beside the elementary operations of DB management, endpoints also give the ability to implement a variety of useful and interesting solutions for other servers. Below we’ll examine one of such beneficial possibilities this feature ensures - how to use a single application server as your production and development environment simultaneously (with the Apache instance from our environment as an example).

1. So, map the endpoint to your Apache server with the preferred unused private port opened.

Note: Do not choose the 80th private port for this task, as Apache uses it by default for the incoming HTTP-requests handling. Otherwise, the whole process, described below, will become pointless.

2. Now, deploy your application twice to different contexts (e.g. prod and dev).

3. The next step is configuring Apache itself - thus, click the Config button next to this server and open its main configuration file (the conf > httpd.conf one).

4. Scroll down approximately to the 135th line and add the following string to the registry of listened ports:


Here, the {port} parameter should be substituted with the private port number you’ve stated during the addition of the endpoint (we’ve chosen the 81st one).

5. After that, move to the end of the file and duplicate the VirtualHost section, specifying the corresponding port number (the same as in the step above - 81st in our case) within its heading.

Then adjust the appropriate DocumentRoot locations for both virtual hosts with the corresponding projects (prod - for the default one and dev - for the custom section beneath).

6. Save the performed changes and Restart the Apache server to apply them.

7. Now you can connect to your prod project as usual, e.g. using the Open in browser button (or entering the external custom domain if one was additionally bound to your app), while for accessing its dev version, you just need to specify the used endpoint’s Access URL.

As a result, you’ve got two connection points to your two projects, which allow you to perform any desired testing or development tasks at one of the copies, with zero influence on the another one. Moreover, they can be swapped in a few clicks if necessary.

That is the way endpoints can be used for facilitating the development process and cutting spends simultaneously. Stay tuned for more useful examples of practical endpoints’ usage in the nearest future.