Git Product home page Git Product logo

sessionmapper's Introduction

SessionMapper GitHub branch checks state

SessionMapper adds properties to your requests based on custom logic. To perform its task, it connects to a Mapping Server that matches sessions to users, groups, roles, experiments, preferences, tracing properties or whatever is needed to provide advanced server-side routing capabilities.

Overview

The SessionMapper middleware for Traefik queries an API and set additional headers before it runs upstream requests. The middleware can be used in front of others. It allows advanced behaviors and applications are limitless... The principle is shown below:

overview

SessionMapper can easily be used and adapted for A/B testing, canary deployment, role-based security, advanced tracing, test collection, personalization...

Configuration

You only need a few parameters to configure the middleware:

  • headers lists the headers to capture from the request and send to the server (default: me)
  • server is the server URL (default: http://localhost:7777/)
  • timeout is the delay in milliseconds before the request to the server fails and no headers are set to the upstream request.

Implementing a SessionMapper Server

For now, the session Mapper is a simple HTTP server that should be colocated to traefik, for instance as a sidecar. The middleware performs a POST to the server URL. The return message would look like below:

{"upstream": {
	"key1": "value1",
	"key2": "value2"
}}

The server directory that is part of the carnage-sh/sessionmapper provides a simple service that implements the current request/response protocol. Next release will improve the protocol to reduce the latency and make it more reliable, including blocking on failure. Do not hesitate to open an issue if you repository find this plugin useful and want to support more advanced scenarios.

sessionmapper's People

Contributors

gregoryguillou avatar sachaki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.