Gokeeper, Pepperbus, Peppercron, and Dashboard: Open‑Source Backend Services Overview and Deployment Guide

This article introduces Huajiao's open‑source backend services—gokeeper, pepperbus, peppercron, and dashboard—detailing their features, architecture, and step‑by‑step Docker‑based deployment, configuration, and usage with Go code examples for service discovery and distributed cron management.

360 Tech Engineering
360 Tech Engineering
360 Tech Engineering
Gokeeper, Pepperbus, Peppercron, and Dashboard: Open‑Source Backend Services Overview and Deployment Guide

The Huajiao live‑streaming backend team has open‑sourced several core services widely used internally, including the centralized configuration center gokeeper , the message bus pepperbus , the distributed cron manager peppercron , and an administrative UI dashboard .

gokeeper is a Go‑written configuration management center that uses ETCD (or Consul, Zookeeper) as the backend store and provides service discovery. It supports primitive Go types, maps, slices, and custom JSON‑based types, and can be accessed via gRPC.

Installation prerequisites: a local Docker environment with docker‑compose and a cloned repository. To start gokeeper, navigate to deploy/docker_compose and run docker-compose up -d.

Example of generating a configuration object from an INI file:

go get -u github.com/huajiao-tv/gokeeper/cmd/gokeeper-cli
$GOPATH/bin/gokeeper-cli -in ./ini_file_path -out data

Client usage example:

//your sections to use
sections := []string{"test.conf/DEFAULT"}
//gokeeper.WithGrpc() will use grpc to connect gokeeper server, otherwise use gorpc
client := gokeeper.New(keeperAddr, domain, nodeID, component, sections, nil, gokeeper.WithGrpc())
client.LoadData(data.ObjectsContainer).RegisterCallback(run)
if err := client.Work(); err != nil {
    panic(err)
}

The service discovery feature lets clients register and discover services without caring about the underlying storage. It supports subscription to specific services, real‑time push of node changes, load‑balancing configuration, and fallback to existing nodes when the discovery service is unavailable.

To use discovery in Go:

instance := discovery.NewInstance(discovery.GenRandomId(), "demo.test.com", map[string]string{discoverry.SchemaHttp: "127.0.0.1:17000"})
instance.Id = "test_id_1"
client := discovery.New(
    "127.0.0.1:7001",
    discovery.WithRegistry(instance),
    discovery.WithRegistryTTL(60*time.Second),
    discovery.WithScheduler(map[string]schedule.Scheduler{"demo.test.com": schedule.NewRoundRobinScheduler()}),
)

And a consumer example:

// start gokeeper client
client := discoverry.New(
    "127.0.0.1:7001",
    discovery.WithDiscovery("example_client1", []string{"demo.test.com"}),
)
addr, err := client.GetServiceAddr("demo.test.com", discovery.SchemaHttp)
if err != nil {
    // handle error
}

pepperbus is the message bus system (GitHub: https://github.com/huajiao-tv/pepperbus, Docker: docker pull huajiao/pepperbus). It provides publish/subscribe messaging for the live‑streaming platform.

peppercron is the distributed cron management service (GitHub: https://github.com/huajiao-tv/peppercron, Docker: docker pull huajiao/pepperbus) used to schedule recurring tasks across the cluster.

dashboard is a web UI that simplifies the operation of pepperbus and peppercron (GitHub: https://github.com/huajiao-tv/dashboard, Docker: docker pull huajiao/dashboard). After cloning the repository, run docker-compose up -d to launch containers for Redis, MySQL, ETCD, gokeeper, pepperbus, peppercron, PHP‑FPM, and the dashboard itself.

Login to the dashboard at http://localhost:8360 with the default admin account (username: admin, password defined in config.yaml). The UI allows adding pepperbus servers, Redis storage, queues, topics, and configuring peppercron tasks, with screenshots illustrating each step.

Overall, the guide provides a complete end‑to‑end deployment and usage reference for these open‑source backend components, enabling developers to set up a production‑grade configuration center, message bus, distributed scheduler, and management console.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendDockerservice discoveryGoopen sourcedistributed cron
360 Tech Engineering
Written by

360 Tech Engineering

Official tech channel of 360, building the most professional technology aggregation platform for the brand.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.