# CNSRE/ABTestingGateway

Repository: https://github.com/CNSRE/ABTestingGateway
Canonical: https://ross.abutalabs.com/products/abtestinggateway
Language: Perl
License: MIT
License Family: permissive
Last push: 2018-10-14T07:05:17+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4063, "days_push": 2880, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2349, forks 759 (observed 2026-08-28T04:06:40.243951+00:00)

## What it is
ABTestingGateway is a layer-7 gray-release (canary) gateway built on nginx and ngx_lua that dynamically routes requests to different upstreams according to diversion policies stored in Redis. Originally part of Sina Weibo's internal dygateway, it supports ip-range, uid-range, uid-tail, and specific-uid splitting, multi-level diversion, and runtime policy changes without restarts.

## Use cases
- dynamically split traffic between upstreams without restarting nginx
- run canary releases with policy-based gray deployment
- do A/B testing based on user id, ip range, or uid tail digits
- gradually route a subset of requests to a beta backend
- set up multi-level staged traffic diversion
- implement layer 7 load balancing with near-native nginx performance

## When to choose
- You already run nginx/openresty and Redis and need runtime-configurable canary or A/B traffic splitting
- You want diversion rules by ip range, uid range, uid tail, or specific uids that take effect immediately without restarts
- Forwarding performance close to native nginx matters to you
- You want to extend the system with custom Lua-based diversion strategies

## When to avoid
- You need an actively maintained gateway - the last release dates to 2018 and it targets older openresty versions with known lua-resty-core compatibility caveats
- Your stack is cloud-native or service-mesh oriented and you would prefer Envoy/Istio or a modern API gateway
- You cannot deploy Redis as the policy database
- You need gRPC or non-HTTP traffic splitting

## Facets
- artifact type: service
- maturity: maintenance
- function: api-gateway, routing, proxy
- domain: backend, web-development, microservices, apis
- platform: self-hosted
- tags: gray-release, canary-deployment, ab-testing, traffic-splitting, nginx, openresty, ngx-lua, redis, load-balancing, dynamic-routing, layer7-gateway, sina-weibo, devops, linux, web-server

## Member repositories
- CNSRE/ABTestingGateway (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.243951+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:36:56.734731+00:00, confidence not recorded.
  - readme: https://github.com/CNSRE/ABTestingGateway (fetched 2026-08-28T04:06:40.243951+00:00, sha 54b9b2cc5967)
- Data as of 2026-08-30T08:39:29.467469+00:00.
