- 08 Feb 2023
- 1 Minute to read
- Print
- DarkLight
Setting Priority Values for Starting Services
- Updated on 08 Feb 2023
- 1 Minute to read
- Print
- DarkLight
Use this feature to control the order in which services are started in the Edge iNode.
Strict Dependency
You can use priority values 3 and 4 to assign application service startup priority to introduce a strict dependency between services.
By strict priority setting, the services in the lower-priority bucket will start only after starting all services in the high- priority bucket. For example, services in priority bucket 4 will start after all services in priority bucket 3 start.
Soft Dependency
You can use priority values 5 and 6 to assign application service startup priority to introduce soft dependency between services.
By soft priority setting, the services in the lower-priority bucket will start after waiting for a preset timeout period for all services in the high-priority bucket to start. For example, the services in priority bucket 6 will start after waiting for a preset timeout (15 seconds) for all services in priority bucket 5 to start.
No Dependency
You can use priority value 7 to specify a service priority that has no dependencies on any other service. A service with priority 7 can start in any order, regardless of the service state of priority buckets between 3 and 6.
Creating a Service Priority
You can create a custom service with the label io_iotium_pod_priority using values between 3 and 7.
Example:
{
"name": "svcName",
"labels": {
"io_iotium_pod_priority":"7"
},
"services": [{
"image": {
"name": "iotium/svcImage",
"version": "latest"
},
"docker": {
"environment_vars": {
"TIMEOUT": "1",
}
}
}]
}