pradeep sharma
Active Member
Hi @twisted1919,
I'd like to initiate a detailed discussion on potential changes aimed at enhancing speed and scalability in future releases of Mailwizz. Having dedicated over a decade to developing a specialized email setup based on Mailwizz V 1.3, I've achieved impressive scalability, capable of processing up to 300 million emails per hour. This setup continues to serve us well, and I am eager to share insights that could benefit upcoming versions, possibly Mailwizz 3.
1. Optimizing MYSQL Usage in Send-Campaign Processes:The current cron job for sending campaigns, while well-crafted, is not optimized from a MYSQL perspective. It operates by processing emails in batches, issuing a MYSQL query with a limit parameter for each batch. For example, if a campaign involves sending 100k emails in batches of 1k, it results in 100 MYSQL queries, each gathering and then limiting data. This repetitive querying is inefficient.
A more efficient approach would involve a MYSQL-based queue system, where only subscriber ids/uids are queued in a table and processed according to a scheduled timeline. This system would benefit from MYSQL 8.0's capability for row-level locking, which is ideal for managing queues and improving processing throughput.
2. Addressing Inefficiencies in Campaign Delivery Logs:We currently use a single table to store all campaign delivery logs, which is manageable for a small volume of daily emails but becomes problematic with larger volumes due to the need to periodically delete old logs. MYSQL operations for deleting data are resource-intensive, affecting CPU and memory usage significantly.
A practical solution would involve segmenting the log storage into multiple tables—potentially 365 tables corresponding to each day of the year, or 12 tables for each month. This setup would allow us to direct logs to the appropriate table based on the campaign's send date and significantly streamline the deletion process by simply truncating whole tables when logs expire.
3. Streamlining Tracking Tables for Open and URL Clicks:Similarly to delivery logs, tracking tables for email opens and URL clicks should be segmented to improve management and facilitate easier deletions. This method would allow for automatic truncation of these tables post-expiration, thereby reducing the overhead on database operations.
4. Consideration for a Separate Database Host for Log Storage:To further optimize performance and scalability, it could be beneficial to host log tables on a separate database server. This separation would help in isolating heavy log data operations from the main operational databases, thereby improving overall system performance.
These enhancements are designed not only to address current inefficiencies but also to scale up the capabilities of Mailwizz as demand and data volumes grow. I look forward to exploring these possibilities further and hope they can be considered for integration into future versions of Mailwizz.
I have few more suggestion which i ll post later on another post.
Looking forward
I have attached some screen shot for referene.
Regards
Pradeep Sharma
Skype: sexy_virus2


I'd like to initiate a detailed discussion on potential changes aimed at enhancing speed and scalability in future releases of Mailwizz. Having dedicated over a decade to developing a specialized email setup based on Mailwizz V 1.3, I've achieved impressive scalability, capable of processing up to 300 million emails per hour. This setup continues to serve us well, and I am eager to share insights that could benefit upcoming versions, possibly Mailwizz 3.
1. Optimizing MYSQL Usage in Send-Campaign Processes:The current cron job for sending campaigns, while well-crafted, is not optimized from a MYSQL perspective. It operates by processing emails in batches, issuing a MYSQL query with a limit parameter for each batch. For example, if a campaign involves sending 100k emails in batches of 1k, it results in 100 MYSQL queries, each gathering and then limiting data. This repetitive querying is inefficient.
A more efficient approach would involve a MYSQL-based queue system, where only subscriber ids/uids are queued in a table and processed according to a scheduled timeline. This system would benefit from MYSQL 8.0's capability for row-level locking, which is ideal for managing queues and improving processing throughput.
2. Addressing Inefficiencies in Campaign Delivery Logs:We currently use a single table to store all campaign delivery logs, which is manageable for a small volume of daily emails but becomes problematic with larger volumes due to the need to periodically delete old logs. MYSQL operations for deleting data are resource-intensive, affecting CPU and memory usage significantly.
A practical solution would involve segmenting the log storage into multiple tables—potentially 365 tables corresponding to each day of the year, or 12 tables for each month. This setup would allow us to direct logs to the appropriate table based on the campaign's send date and significantly streamline the deletion process by simply truncating whole tables when logs expire.
3. Streamlining Tracking Tables for Open and URL Clicks:Similarly to delivery logs, tracking tables for email opens and URL clicks should be segmented to improve management and facilitate easier deletions. This method would allow for automatic truncation of these tables post-expiration, thereby reducing the overhead on database operations.
4. Consideration for a Separate Database Host for Log Storage:To further optimize performance and scalability, it could be beneficial to host log tables on a separate database server. This separation would help in isolating heavy log data operations from the main operational databases, thereby improving overall system performance.
These enhancements are designed not only to address current inefficiencies but also to scale up the capabilities of Mailwizz as demand and data volumes grow. I look forward to exploring these possibilities further and hope they can be considered for integration into future versions of Mailwizz.
I have few more suggestion which i ll post later on another post.
Looking forward
I have attached some screen shot for referene.
Regards
Pradeep Sharma
Skype: sexy_virus2

