Absystem - Golang implemented absystem core api

环境初始化

export GOPROXY=https://goproxy.cn,direct && export GO111MODULE=on
# OR 
go env -w  GOPROXY="https://goproxy.cn,direct"
go env -w  GO111MODULE=on

# then
go mod download

编译&运行

make && ./absys --help

# 程序每30s中自动去mysql拉取最新的实验配置

Usage of ./absys:
     -config string
           mysql configs (default "./cfg.toml")
     -port int
           server port (default 9200)

依赖mysql

# 自动创建tab,插入demo实验数据
cd api/script/
python3 initdb.py
  • 实验status=1, 则只有allow_list中的设备生效(仅白名单生效模式,用来做AA和上线前Debug)
  • 实验status=2, 则allow_list和配置的实验流量比例在线生效(线上流量放开的正常状态)
  • 实验ID L1E1 永远不会出现在输出结果中,该实验的参数是全局基础默认值(独占layer1 100%)
    • 其他层实验,仅出现自己的实验参数即可, 系统自动会按照layer1 ~ layerN的方式更新聚合所有参数
    • 实验上线后效果OK则可以将对应参数更新到L1E1全流量生效
    • 注意需要定时清理全局在线逻辑的开关, 避免已上线逻辑的开关一直存在, 会导致L1E1参数膨胀,代码也难以维护

请求demo

curl -X POST -d '{"uid":"l1-232935"}' http://localhost:9200/absys
{"data":{"eid":"L2E2","params":"eyJyZWNhbGwiOnsiYWxwaGEiOjAuNzUsImJldGEiOjAuNX19", "qid":1401753478321143808},"status":0}


status = 0表示ok
eid为命中的实验id列表
params: 为base64编码的实验参数

v0.0.1 压测结果(QPS万级别)

➜  hey git:(master) ./bin/hey_darwin_amd64 -m POST -H "Content-Type:application/json" -d '{"uid":"l1-232935"}'  -n 10000 -c 20 'http://localhost:9200/absys'

Summary:
  Total:	0.2667 secs
  Slowest:	0.0414 secs
  Fastest:	0.0000 secs
  Average:	0.0005 secs
  Requests/sec:	37490.5044

  Total data:	1000000 bytes
  Size/request:	100 bytes

Response time histogram:
  0.000 [1]	|
  0.004 [9931]	|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.008 [37]	|
  0.012 [11]	|
  0.017 [0]	|
  0.021 [0]	|
  0.025 [0]	|
  0.029 [0]	|
  0.033 [0]	|
  0.037 [8]	|
  0.041 [12]	|


Latency distribution:
  10% in 0.0001 secs
  25% in 0.0001 secs
  50% in 0.0003 secs
  75% in 0.0005 secs
  90% in 0.0009 secs
  95% in 0.0014 secs
  99% in 0.0033 secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0000 secs, 0.0000 secs, 0.0122 secs
  DNS-lookup:	0.0000 secs, 0.0000 secs, 0.0057 secs
  req write:	0.0000 secs, 0.0000 secs, 0.0086 secs
  resp wait:	0.0004 secs, 0.0000 secs, 0.0260 secs
  resp read:	0.0000 secs, 0.0000 secs, 0.0079 secs

Status code distribution:
  [200]	10000 responses

Owner
Similar Resources

Core is the next-generation digital data engine.

Core is the next-generation digital data engine.

tKeel-Core The digital engine of world 🌰 Core is the data centre of the tKeel IoT Open Platform, a high-performance, scalable and lightweight next-ge

Mar 28, 2022

POKTwatch pocket-core fork

POKTwatch pocket-core fork

Pocket Core Official golang implementation of the Pocket Network Protocol. Overview The Pocket Core application will allow anyone to spin up a Pocket

Jan 10, 2022

Go-libp2p-core. - Home to the interfaces and abstractions that make up go-libp2p

go-libp2p-core Home to the interfaces and abstractions that make up go-libp2p. I

Jan 17, 2022

ULE - Rust-based minecraft server core

ULE - Minecraft's server core written in Rust This's server core fully written i

Jan 6, 2023

Build - The axelar-core app based on the Cosmos SDK is the main application of the axelar network

⚠️ ⚠️ ⚠️ THIS IS A WORK IN PROGRESS ⚠️ ⚠️ ⚠️ axelar-core The axelar-core app bas

Feb 15, 2022

communicate with iOS devices implemented with Golang

Golang-iDevice much more easy to use 👉 electricbubble/gidevice-cli Installation go get github.com/electricbubble/gidevice Devices package main impor

Dec 18, 2022

many tools implemented in Golang

Go-Tools many tools implemented in Golang tools project comments abtest AB测试分流 dag_flow DAG工作流 hugo_themes Hugo主题 log_monitor 日志监控服务 pepper_cache 内存kv

Dec 12, 2021

A simple FTP protocol with client and server implemented in TypeScript and Golang

websocket-ftp A simple FTP protocol with client and server implemented in TypeScript and Golang. Example (Client) const buffer: Uint8Array = (new Text

Apr 14, 2022
Related tags
Dcfs-core - Dcfs Smart Chain With Golang

Dcfs Smart Chain The goal of Dcfs Smart Chain is to bring programmability and in

Jan 12, 2022
Yet another SIP003 plugin for shadowsocks, based on Xray-core

Yet another SIP003 plugin for shadowsocks, based on Xray-core Build go build Usage See command line args for advanced usages.

Jan 8, 2023
Open source 5G core network base on 3GPP R15
Open source 5G core network base on 3GPP R15

What is free5GC The free5GC is an open-source project for 5th generation (5G) mobile core networks. The ultimate goal of this project is to implement

Jan 4, 2023
Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.
Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Connecting the Next Billion People Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core

Dec 31, 2022
An opinionated clean fork of v2fly/v2ray-core

v2ray-go An opinionated fork of v2fly/v2ray-core. Additional Features ?? Add flag -suppressTimestamps to suppress timestamps in logs ?? Refine systemd

Nov 21, 2022
Baseledger core consensus for running validator, full and seed nodes

baseledger-core Baseledger core consensus client for running a validator, full or seed node. ⚠️ WARNING: this code has not been audited and is not rea

Jan 13, 2022
Reference implementation of the PLAN Data Model and core components

PLAN is a free and open platform for groups to securely communicate, collaborate, and coordinate projects and activities.

Nov 2, 2021
Courier Order Provider is a service that receives signals from core server in order to emit this orders to courier groups.

Courier Order Provider Courier Order Provider is a service that receives signals(messages) from core server in order to emit this orders to courier gr

Nov 4, 2021
Poseidon -- An Enhanced V2Ray(based on v2ray-core)

Poseidon -- An Enhanced V2Ray(based on v2ray-core) Support SSRPanel(VNetPanel), V2board, SSpanel-v3-Uim Features Sync user from your panel to v2ray Lo

Nov 14, 2021
Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.

Project X Project X originates from XTLS protocol, provides a set of network tools such as Xray-core and Xray-flutter. License Mozilla Public License

Jan 7, 2023