> For the complete documentation index, see [llms.txt](https://dev7days.gitbook.io/dev7days/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev7days.gitbook.io/dev7days/aws/elb-and-asg/sticky-sessions.md).

# Sticky Sessions

It is the concept that use `cookie` to let the request always redirect to the same instance. This feature is applied in `ALB`and `NLB.`

<img src="https://2166680554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9VzT74ziIucCaJgfreE%2Fuploads%2FvnFKhLVafg7CBY9dDqPD%2Ffile.excalidraw.svg?alt=media&amp;token=6315db9f-fe5e-486c-a219-6340c2da6255" alt="" class="gitbook-drawing">

There are 2 kind of cookies

1. Application-based Cookies
2. Duration-based Cookies

### (1) Application-based Cookies

It is a custom cookie generated by our application. For naming , It is not able to use `AWSALB` , `AWSALBAPP` or `AWSALBTG` because this keyword reserved by ELB.

### (2) Duration-based Cookies

It is a cooke generated by the load balancer. Cookie name is `AWSALB` for ALB , `AWSELB` for CLB.
