wallaby

package module
v0.0.0-...-457da86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2017 License: Apache-2.0 Imports: 0 Imported by: 0

README

wallaby

edge proxy with excellent flexibility and moderate performance

routing process

Overall Proxy Sequence

ServerConn => ConnForwardingDecision => ServerRequest => ClientRequest => ServiceKinds => ServiceInstance => RoutingDecision

there are three routing modes

  • per connection routing: RoutingDecision is determined by ServerConn. This mode is most generic, can handle any kind of tcp stream without knowing the protocol
  • per stream routing: RoutingDecision is determined by first request packet in the connection or stream (when protocol is multiplex, there might be multiple streams on one connection) this mode do not need to do stateful protocol handling, and can route with more information
  • per packet routing (a.k.a RPC mode): RoutingDecision might be different for different request packet this mode is most powerful and most costly, need complete implementation of protocol including encoding/decoding/stateful action sequences

the routing decision process works like this:

  • ServerConn => ConnForwardingDecision: when a tcp connection is established, how to forward the connection (routing mode/protocol) is determined
  • ConnForwardingDecision => ServerRequest: parse request arrived server
  • ServerRequest => ClientRequest: by parsing the request, we know what is the target service
  • ClientRequest => ServiceKinds: one service have many clusters, filter out feasible clusters by cluster routing table.
  • ServiceKinds => ServiceInstance: choose one most optimal service cluster from many clusters, choose one most optimal service instance from that cluster
  • ServiceInstance => RoutingDecision: given the service status, should we accept/reject/wait the request. If accept, handle the request by chosen service instance.

User Guide

1 get dependencies (require glide)

glide install

2 build wallaby proxy

go install github.com/v2pro/wallaby/cmd/proxy

3. run

proxy

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL