Releasing a Sticky Session

Releasing a sticky session has several benefits:

  • Use a different proxy for a new connection.
  • Free up limited resources, such as ports or threads.
  • Refresh your connection for enhanced security.

If you need to remove a proxy from a sticky session, you can make the HTTP or cURL request below.

Run in Postman

Request

PUT
https://monitor.geonode.com/sessions/release/{serviceType}

URL Parameters

  • Name
    service-name
    Type
    ServiceType
    Description

    (Required) The service name. RESIDENTIAL-PREMIUM | RESIDENTIAL-UNMETERED | SHARED-DATACENTER

Body Parameters

  • Name
    data
    Type
    object[]
    Description

    (optional) [{port: 10003, sessionId:'x1y2z3'}] port(Required) Target port number. 9***'s for rotating and 10***'s for sticky proxies.sessionId (Optional) is optional.

  • Name
    releaseAll
    Type
    boolean
    Description

    (optional) Use for release all sticky sessions.

Authentication (Basic Auth)

  • Name
    username
    Type
    string
    Description

    (Required) Your API username.

  • Name
    password
    Type
    string
    Description

    (Required) Your API password.

Example Request Body

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

Expected Response

{
  "success":true
}

Methods to Release Sticky Sessions

Here are three methods to release sticky sessions, along with their respective payload examples:

Method 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:

Payload to API endpoint

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

This method will delete all sessions associated with the specified port.

Method 2: By Session ID and Port

If you want to release a specific session that was created using a random character session ID under a particular port, you need to provide both the session ID and the port. The session ID should follow this format: [username]-session-[random_characters]:[password].

Example using cURL:

Example using cURL

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

Payload to API endpoint

{ "data": [{ "sessionId": "2mjxDRt7EJDddhGv", "port": 10000 }] }

This method effectively releases only the specified session while preserving others associated with the same port.

Method 3: By Ports

To release all sessions associated with multiple ports, including those created using random session IDs, use the following payload and API endpoint:

Payload to API endpoint

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

This method deletes all sessions linked to the provided ports, allowing for a comprehensive release of sticky sessions across multiple destinations.

Method 4: Release all sessions

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

Payload to API endpoint

{ "releaseAll": true }

Conclusion

Releasing sticky sessions can be a critical operation in network management, offering benefits such as improved resource utilization, enhanced security, and the ability to switch to different proxies. By following the methods outlined in this guide, you can release sticky sessions efficiently, tailored to your specific use case.