Skip to content
A GSLB router for microservices
Go Protocol Buffer
Find file
Latest commit 580aeb7 @asim asim strip glog
Failed to load latest commit information.
db Name proto packages
handler Add rule handling
label Name proto packages
proto Name proto packages
router Add rule handling
rule Name proto packages
Dockerfile First
LICENSE First
README.md update readme
main.go strip glog

README.md

Router Server

Router server provides global routing capabilities. It is not a proxy. It has the selector semantics and offloads actual routing to smart clients. Its job is to maintain routing information about the environment and route appropriately.

The router also provides weighted and label based routing.

Getting started

  1. Install Consul

    Consul is the default registry/discovery for go-micro apps. It's however pluggable. https://www.consul.io/intro/getting-started/install.html

  2. Run Consul

    $ consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul
    
  3. Start a mysql database

  4. Download and start the service

    go get github.com/micro/router-srv
    router-srv --database_url="root:root@tcp(192.168.99.100:3306)/router"

    OR as a docker container

    docker run microhq/router-srv --database_url="root:root@tcp(192.168.99.100:3306)/router" --registry_address=YOUR_REGISTRY_ADDRESS

The API

Router server implements the following RPC Methods

Router

  • Stats
  • Select
  • SelectStream

Label

  • Read
  • Create
  • Update
  • Delete
  • Search
Something went wrong with that request. Please try again.