The parameters of worker in config is not effective
Recently I updated from Postal v1 to v2, but the speed of sending mail becomes slow.
In my configuration, I set workers: quantity: 16 threads: 4. But after I run postal start, only 1 worker container was created.
Then I use postal start --scale worker=16 after reading https://github.com/postalserver/postal/discussions/1461#discussioncomment-1119403 and a number of worker containers have been created.
So my problem is, do the parameters of worker quantity in configuration can not be read when I run postal start?
the scale parameter that resolves this is just a normal docker-compose parameter, of which you can pass a lot to the docker-composer command.
Ref.: https://github.com/postalserver/install/blob/main/bin/postal#L86.
Since everything now relies more or less on docker-compose, I think updating the postal-script to load and parse the postal.yml wouldn't be that bad of an idea, at least we get the scale option back running automatically.
Ah I had forgotten that the scale argument was how it needs to be done now, makes sense. You could also specify the scale in the docker-compose.yml file if you wanted it to be written down somewhere, the scale argument still overrides it if you need some extra briefly.
Postal trusts you to write a good config file and there isn't much in the way of validating or alerting on an incorrect or invalid configuration.
It would be nice if Postal detected the config value being greater than zero and warned in the UI that you might not be getting the performance you wish for.
You could certainly make use of something like yq to read the config file and add in the scale automatically if it wasn't already set but I am not sure how straightforward that would be.
Given that Postal v1 had multiple workers by default and v2 doesn't, it might be worth having a scale present in the docker-compose file by default to achieve parity with previous behaviour.
At the very least, this should be documented in the Upgrading From 1.x page.
Dose this scale config of docker compose respect this line if we don't have the worker config in postal.yml https://github.com/postalserver/postal/blob/2f62baa238fc1102706ee4acf079b7a876b05283/lib/postal/rabbit_mq.rb#L32
This configuration is no longer valid in v3.