Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tool for Make Ping-pong in microservice systems

Build

docker build .

Env Variables

  • APP_URL: request url for ping
  • INSTANCE_ID: Id configured for each instance

APIs

Ping: /ping

Method: Post

Request:

{
  "ttl": 1, //>=1
  "count": 0,// use 0 for manual ping
  "initial": {
    "id": "string",// whatever you like for initial
    "ip": "string"// whatever you like for initial
  },
  "sender": {
    "id": "string",// whatever you like for initial
    "ip": "string"// whatever you like for initial
  }
}

Response:

{
  "count": 1,// = initial TTL
  "initial": {
    "id": "string",
    "ip": "string"
  },
  "lastNode": {
    "id": "string",
    "ip": "string"
  },
  "thisNode": {
    "id": "default", // id last arrived node
    "ip": "172.17.0.2" // last arrived node
  }
}

Batch: /batch

Method: Post

Request:

{
  "ttl": 0,// TTL for each ping
  "batchSize": 0// Number of ping requests to execute
}

Response:

{
  "stats": {
    "[Ip,Id]": {
      "count": 0,// Number of response with lastnode=[Ip,Id]
      "ratio": 0 // Ratio of response with lastnode=[Ip,Id]
    }
  },
  "details": [
    {
      "finalNode": { // lastnode from pong
        "id": "string",
        "ip": "string"
      },
      "time": 0 // time used, unit: ms
    }
  ]
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages