retry

command module
v0.0.0-...-d4c82a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README ΒΆ

title

Retry Microservice


πŸ“„ Contents


❕ Description

The Retry service's goal is to reschedule pods that failed




❕ Deployment of the retry service

Before deploying the retry.yaml file, please configure the environment variables to the correct values used by the queue microservice.

env:
- name: MQ_HOST
  value: "sched-rabbitmq-0.sched-rabbitmq.custom-scheduler.svc.cluster.local"
- name: MQ_PORT
  value: "5672"
- name: MQ_USER
  value: "guest"
- name: MQ_PASS
  value: "guest"
- name: RECEIVE_QUEUE
  value: "epsilon.backoff"



❕ Retry algorithm

retryAlgo

[STEP 1]
The retry service monitors the queue for new pods that failed.

[STEP 2]
When a pod that failed is recevied, the retry service will generate a backoff timer and wait for the backoff timer to pass

[STEP 3]
Once the backoff duration had past, the retry service will send the failed pod back to its respective scheduling queue



❕ Directory and File Description

Directory Name File name Description
/ main.go Implementation code of the main routine
/helper helper.go Contain helper methods use by the main routine
/docker Dockerfile Used by docker to create a docker image
/yaml retry.yaml Deployment file to deploy the scheduler in a Kubernetes cluster



❕ Common questions

How to change the retry algorithm?
The function WaitAndSend() in line 176 of main.go, contains the implementation of the retry algorithm. By modifiying this function the retry algorithm can be modified.


Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL