Hej all
First of all, fly has been amazing so far.
We are evaluating a possibility to launch machines via the machine API and have them launched/scaled based on concurrency, however we are having challenges in modifying the concurrency settings via the .toml
that’s generated using fly m launch
. Ideally we want to run a machine as a worker for a single request/task.
# fly.toml file generated for node-web-6 on 2022-11-02T10:10:18+01:00
app = "node-web-6"
primary_region = "ams"
[build]
[http_service]
internal_port = 8080
force_https = true
[env]
[deploy]
We have also tried creating an app using the fly m api-proxy
via
curl -i -X POST \
-H "Authorization: Bearer ${FLY_API_TOKEN}" -H "Content-Type: application/json" \
"http://${FLY_API_HOSTNAME}/v1/apps" \
-d '{
"app_name": "node-web-4",
"org_slug": "org-name",
"config":{
"env": {},
"experimental": {
"allowed_public_ports": [],
"auto_rollback": true
},
"kill_signal": "SIGINT",
"kill_timeout": 5,
"processes": [],
"services": [
{
"concurrency": {
"hard_limit": 1,
"soft_limit": 1,
"type": "requests"
},
"http_checks": [],
"internal_port": 8080,
"ports": [
{
"force_https": true,
"handlers": [
"http"
],
"port": 80
},
{
"handlers": [
"tls",
"http"
],
"port": 443
}
],
"processes": [
"app"
],
"protocol": "tcp",
"script_checks": [],
"tcp_checks": [
{
"grace_period": "1s",
"interval": "15s",
"restart_limit": 0,
"timeout": "2s"
}
]
}
]
}
}'
However when the app is created but those concurrency settings default to
"concurrency": {
"hard_limit": 25,
"soft_limit": 20,
"type": "connections"
which we verified via fly config display -a node-web-4
Could you please assist us with a way to update the concurrency?
Thank you so much!