How to Release a Sticky Session

Managing sticky sessions effectively is crucial for maintaining optimal proxy performance. Sometimes, you may need to release a sticky session to change your IP address or free up resources for new tasks. Releasing a sticky session allows you to end the current connection and start a new one, ensuring flexibility and efficiency in your proxy usage.

Releasing a sticky session offers several benefits:

- Use a different proxy for a new connection.

- Free up limited resources like ports or threads.

- Refresh your connection for enhanced security.

Method 1: Dashboard

Step 1: Log In to Geonode Dashboard

Access the Geonode Dashboard using your registered account credentials.

Step 2: Statistics Tab

Choose the service for which you want to release a sticky session. On the left side of the dashboard, choose a product/service and locate the "Statistics" tab. (Let's use "Premium Residential" as an example here.)

Step 3: Scroll down to the "Sticky Sessions" section.

Please select a session and tick its box. Click the "Release Sessions" button to release the session.

Also, you can tick all the sessions available by clicking the "Session ID" box and clicking the "Release all" button.

A prompt will display that sessions were released:


Method 2: API

To remove a proxy from a sticky session, use the HTTP or cURL request below:

curl --location --request PUT 'https://monitor.geonode.com/release/RESIDENTIAL-PREMIUM' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic (username+password) ==' \
--data '{
Payload to API Endpoint: Options: 1-2-3-4
}
'

Option 1: By Port

To release all sessions under a specific port, including those created using random session IDs, use the following payload and API endpoint, which will delete all sessions associated with the specified port.

Payload to API Endpoint {
  "data":[{"port":10001}] ;
}

Option 2: By Session ID and Port

To release a specific session created using a random character session ID under a particular port, provide both the session ID and the port. The session ID should follow this format: [username]-session-[random_characters]:[password]. This method effectively releases only the specified session while preserving others associated with the same port.

Example using cURL

curl -x premium-residential.geonode.com:10000 -U [username]-session-2mjxDRt7EJDddhGv:[password] http://ip-api.com/json


Payload to API Endpoint {
  "data":[{"sessionId":"2mjxDRt7EJDddhGv","port": 10000}];
}

Option 3: By Ports

Use the provided payload and API endpoint to release all sessions associated with multiple ports, including those created using random session IDs. This method deletes all sessions linked to the provided ports, allowing for a comprehensive release of sticky sessions across multiple destinations.

Payload to API Endpoint

{ "data": [{ "port": 10000 }, { "port": 10001 }, { "port": 10001 }] }


Option 4: Release All Sessions

To release all sessions use the following payload and API endpoint:

Payload to API Endpoint

{ "releaseAll": true }



HTTP

Request
PUT
curl --location --request PUT 'https://monitor.geonode.com/release/RESIDENTIAL-PREMIUM' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic [..........]==' \
--data '{
"port": 10000
}

Example Request Body

{
  data: [ {"port": 10001} ]
}

cURL

Request
PUT
curl -X PUT -d port= -u : https:///monitor.geonode.com/sessions/release/{serviceType}


Example Request Body

{
  data: [ {"port": 10001} ]
}


URL Parameters

service-name e.g., residential-premium

The name of the service that you purchase.


Body Parameters

data object[]

optional


port integer

The target port number. 9***'s for rotating and 10***'s for sticky proxies.


sessionID integer

The target port number. 9***'s for rotating and 10***'s for sticky proxies.


releaseAll boolean

Use to release all sticky sessions (optional).


Authentication (Basic Auth)

username string

Your API username (Required)


password string

Your API password (Required)

Implementation

Expected Response

{
  "success":true
}


Conclusions

Releasing sticky sessions is a crucial task in network management, providing benefits like better resource usage, heightened security, and the option to switch to alternate proxies. This guide outlines methods to release sticky sessions effectively, customized to your specific needs.