Skip to content

kitsune/kyogetsu-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Kyogetsu Proxy

Kyogetsu proxy is a lightweight reverse proxy that forks traffic between Production and Staging servers and reporting the results. This allows a RC to experience dynamic production traffic without exposing your users to staging code.

Features:

  • Independent Production and Staging requests. Users never have to wait on staging to finish
  • Saving of Staging's cookies for subsequent requests
  • Redis integration for the persistant storage of cookies.
  • Publishing of results to a message queue so other programs can looks for difference (this is not done in the proxy to keep it lightweight)
  • NATS integration for the message queue.
  • Heavy use of interfaces so people that don't want to use NATS or Redis can implement their own prefered choice

Installation

go get github.com/kitsune/kyogestu-proxy

Quick Start Example

import (
  "github.com/kitsune/kyogestu-proxy/kyogetsu"
  "net/http"
)

func main() {
    ph := kyogetsu.NewSingleProxyHandler("http://127.0.0.1:8082", "http://127.0.0.1:8081")
    c := kyogetsu.NewRedisCache("127.0.0.1:6379")
    ms := kyogetsu.NewNatsSender("nats://localhost:4222", "test")
    p := kyogetsu.NewKyogetsuProxy(ph, ms, c, kyogetsu.CookieIdFunction("id"))
    h := http.NewServeMux()
    h.Handle("/", p)
    http.ListenAndServe(":8080", h)
}

Libraries Used

About

A proxy for forking production requests to staging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages