Skip to content

Sessions Storage for CookieStickySessions #1408

Open
@EliSyrota

Description

@EliSyrota

Problem to solve

The current implementation of CookieStickySessions contains ConcurrentDictionary<string, StickySession> _stored where all the sessions are stored.
We faced a situation when we need to have a few Ocelot instances on-premise of the customer
and we have some services that enforces us to use CookieStickySessions for our Load Balancer (https://ocelot.readthedocs.io/en/latest/features/loadbalancer.html#cookiestickysessions).
Having several instances of Ocelot push us to add the ability to use CookieStickySessions for load balancing across these several Ocelot instances.
To do so we need to have an ability to inject our own session storage implementation for CookieStickySessions

New Feature

Sessions storage implementations for CookieStickySessions load balancer.
Add the ability to use CookieStickySessions for Load Balancer across these several Ocelot instances

Steps to Reproduce the Problem

  1. extract sessions collection from CookieStickySessions
  2. make a public interface for session storage so users can implement their own mechanism of storing user sessions such as distributed sessions storage etc.
  3. substitute CookieStickySessionsCreator to inject into CookieStickySessions own storage mechanism

Metadata

Metadata

Labels

Load BalancerOcelot feature: Load BalanceracceptedBug or feature would be accepted as a PR or is being worked onproposalProposal for a new functionality in Ocelot

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions