Throttling: add multiplier setting

Created on 7 March 2023, over 1 year ago
Updated 18 April 2023, about 1 year ago

Problem/Motivation

The throttling option correctly calculates the number of milliseconds that each mail request should sleep for, IF the server can only execute one request at a time.

However, some servers may have multiple execution workers (e.g. "children" in PHP-FPM) working in parallel. This increases the number of requests potentially served per second, which means the throttle sleep time may not be adequate to avoid hitting the rate limit.

Proposed resolution

Add a setting called something like "multiplier" alongside the throttling toggle. Minimum 1, default 1. It would multiply the $per_second value in AmazonSesHandler->getSleepTime()

Before:
$per_second = ceil(1000000 / $results['MaxSendRate']);

After, something like:
$per_second = ceil(1000000 * $multiplier / $results['MaxSendRate']);

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bvoynick

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024