# Session Management

## Session Control

### Session Type

1024Proxy provides two session modes to control how proxy IPs are used:

* Sticky IP
* Rotating IP

Different session types are suitable for different business scenarios. Choosing the appropriate session mode can significantly improve stability, success rates, and account security.

### Sticky IP

A Sticky IP session means that the proxy continuously assigns and uses the same IP address within a single session period.\
As long as the session has not expired or been manually terminated, all subsequent requests will continue to use the same IP.

With 1024Proxy, the Sticky IP session duration ranges from 1 to 120 minutes. Users can configure a single IP to remain fixed for 1–120 minutes of continuous requests.

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FzIOxh3cEYmcRyLxmlO0B%2F0206001.png?alt=media&#x26;token=d117d58a-0c36-4d47-b8f1-8515cd22efd5" alt=""><figcaption></figcaption></figure>

#### Key Features

* ✅ IP remains unchanged during the session period
* ✅ Behavior closely resembles that of real users
* ✅ Reduces the risk of detection caused by frequent IP changes
* ✅ Ideal for scenarios requiring login status or continuous operations

#### Use Cases

* Account login and long-running online operations\
  (within 1–120 minutes; for longer-term usage, please choose long-term static ISP IPs)
* Social media account management (login, browsing, posting)\
  (within 1–120 minutes; for longer-term usage, please choose long-term static ISP IPs)
* Cross-border e-commerce store backend management\
  (within 1–120 minutes; for longer-term usage, please choose long-term static ISP IPs)
* Applications that require maintaining cookies or sessions
* Continuous request tasks in automated scripts

#### Usage Recommendations

* Use an appropriate session duration based on your business needs
* Avoid high-frequency or abnormal operations under the same IP
* If an IP becomes unstable or restricted, start a new session to obtain a new IP

### Rotating IP

A Rotating IP session means that the system automatically assigns a different proxy IP for each request or within very short intervals, without any manual switching required.\
There is no session duration setting in this mode, and the IP cannot remain fixed for a specific period of time.

#### Key Features

* 🔄 IP automatically changes with each request
* 🔄 High utilization of proxy pool resources
* 🔄 Effectively distributes access pressure
* 🔄 No need to maintain session state

#### Use Cases

* Large-scale web scraping and data collection
* Search engine results harvesting
* Price monitoring and market intelligence
* Public data access without login requirements
* High-concurrency, short-request workloads

#### Usage Recommendations

* Not suitable for use cases that require long-term logins or maintaining persistent sessions
* Control request frequency to simulate realistic browsing behavior
* Combine with Country / City / ASN parameters for precise IP rotation

### How to Choose the Right Session Type

| Use Case                              | Recommended Session Type            |
| ------------------------------------- | ----------------------------------- |
| Login required / identity persistence | Sticky IP                           |
| High-frequency access without login   | Rotating IP                         |
| Social media & e-commerce accounts    | Sticky IP                           |
| Web crawlers & data scraping          | Rotating IP                         |
| Risk-control–sensitive operations     | Sticky IP + reasonable request rate |

### Summary

The fundamental difference between Sticky IP and Rotating IP in 1024Proxy lies in whether the IP address remains stable.\
Users can flexibly select or combine session types based on their requirements for stability, concurrency, and anonymity, ensuring higher business success rates while maintaining security.

### Example Code

The following examples use German proxy IPs to demonstrate how to configure session types by adding parameters such as\
`-sid-<Session ID>-t-<minutes>` to enable scheduled IP rotation or automatic rotation.

#### Rotating IP Mode

In this mode, the IP is not fixed. A new IP is automatically assigned for each request.

HTTP(S)

```
curl -x HOST:PORT -U "USERNAME-region-DE:PASSWORD" ipinfo.io
```

SOCKS5

```
curl --socks5 HOST:PORT -U "USERNAME-region-DE:PASSWORD" ipinfo.io
```

#### Sticky IP Mode

In this mode, the IP remains fixed for the configured sticky duration.

HTTP(S)

```
curl -x HOST:PORT -U "USERNAME-region-DE-sid-ENQzeWjG-t-5:PASSWORD" ipinfo.io
```

SOCKS5

```
curl --socks5 HOST:PORT -U "USERNAME-region-DE-sid-ENQzeWjG-t-5:PASSWORD" ipinfo.io
```
