ultimate is a game server with horizontally-scalable and high-available. It was powered by go-micro and running in docker container.
- using mysql as data persist.
- using consul as server discovery and registry.
- using grpc as rpc call from each servers.
- using nsq as message transporter.
- using loki/grafana as log storage and processing queries.
clone this repo
git clone https://github.com/hellodudu/Ultimate.git
-
nsq:
nsqlookupd nsqd --lookupd-tcp-address=127.0.0.1:4160
-
consul:
consul agent -dev
-
game-service:
cd game-service go run main.go plugin.go --registry=consul --broker=nsq
-
arena-service:
cd arena-service go run main.go plugin.go --registry=consul --broker=nsq
-
plugin
first please install docker log driver plugin for loki.
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
-
build
make docker
-
run
docker-compose up
-
consul can be watched by https://localhost:8500
-
nsq can be watched by https://localhost:4171
-
grafana can be watched by https://localhost:3000
-
loki can be watched after adding data source