Rspamd testing

Vsevolod Stakhov
Vsevolod StakhovSoftware Engineer at Mimecast
RSPAMD TESTING
PROBLEM STATEMENT
WHY TESTING IS HARD
▸ Need to test on live traffic
▸ Testing environment might be less powerful (e.g. a VM)
▸ Experimental machines can fail or die
▸ Need to compare all results
PROBLEM STATEMENT
GOALS: TEST NEW VERSIONS
STABLE VERSION TESTING VERSION
COMPARE
RESULTS
PROBLEM STATEMENT
GOALS: TEST NEW RULES
OLD RULES NEW RULES
COLLECT
STATISTICS
NEW PLUGINS
PROBLEM STATEMENT
GOALS: COMPARE SPAM ENGINES
RSPAMD OTHER SCANNER
COMPARE
QUALITY
PROBLEM STATEMENT
GOALS: COLLECT GLOBAL STATISTICS
RSPAMD
GATHER
STATS
RSPAMD RSPAMDRSPAMD
1% 2% 10% 0.5%
STATISTICS
ARCHITECTURE
SCAN SCHEME
RSPAMD PROXY
STABLE CLUSTER TESTING CLUSTER TESTING CLUSTER
Proxy stable result
COMPARE
RESULTS
ARCHITECTURE
MAIN FEATURES
▸ Reply immediately when get results from the main cluster
▸ Fast and low latency architecture
▸ Can use multiple compare result scripts
▸ Compare scripts could use all API functions from rspamd
ARCHITECTURE
ENCRYPTION PROXY
RSPAMD PROXY
STABLE CLUSTER
Encrypt using HTTPCrypt
Scan local file
ARCHITECTURE
ENCRYPTION PROXY
▸ Encrypt with HTTPCrypt:
▸ low latency (0 RTT before data sending)
▸ zero copy
▸ provable secure
▸ simple keys management
▸ Can open local files and send encrypted data stream
▸ Each cluster can have its own unique encryption key
▸ Local keys are rotated frequently
ARCHITECTURE
LOAD BALANCING
RSPAMD PROXY
STABLE CLUSTER TESTING CLUSTER TESTING CLUSTER
COMPARE
RESULTS
50% 10%
Balance within clusters
ARCHITECTURE
LOAD BALANCING
▸ Send certain amount of traffic to each testing cluster
▸ Balance within each cluster:
▸ balancing schemes: round-robin, master-slave, random
▸ each server can have its own priority
▸ can detect if an upstream is down
▸ lazily resolve upstream names (DNS balancing)
ARCHITECTURE
FOREIGN EXTERNAL SCANNERS
RSPAMD PROXY
STABLE CLUSTER
Encrypt using HTTPCrypt
Scan local file
FOREIGN CLUSTER TESTING CLUSTER
Use LUA script to parse results
ARCHITECTURE
FOREIGN EXTERNAL SCANNERS
▸ Can scan external scanners, e.g. SA or Cloudmark
▸ Can evaluate their efficiency comparing to rspamd
▸ Use Lua filter to parse external scanners results
COMPARE EXAMPLES
AN EXAMPLE OF COMPARISON SCRIPT
return function(results)
local log = require "rspamd_logger"
for k,v in pairs(results) do
if type(v) == 'table' then
log.infox("%s: %s", k, v['default']['score'])
else
log.infox("err: %s: %s", k, v)
end
end
end
FUTURE PLANS
POTENTIAL FEATURES
▸ Balance not merely HTTP but also SMTP
▸ Perform retries when master connection fails somehow
▸ Use mirrors results if the whole stable cluster is dead
▸ Location based balancing (select the nearest or the fastest
server among possible choices)
1 of 16

Recommended

rspamd-fosdem by
rspamd-fosdemrspamd-fosdem
rspamd-fosdemVsevolod Stakhov
3.3K views84 slides
Advanced Terraform by
Advanced TerraformAdvanced Terraform
Advanced TerraformSamsung Electronics
104 views23 slides
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison by
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Severalnines
47.7K views44 slides
HA Deployment Architecture with HAProxy and Keepalived by
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedGanapathi Kandaswamy
1.8K views41 slides
Cấu hình giao thức ldaps cho việc change password của ad từ các hệ thống vpn by
Cấu hình giao thức ldaps cho việc change password của ad từ các hệ thống vpnCấu hình giao thức ldaps cho việc change password của ad từ các hệ thống vpn
Cấu hình giao thức ldaps cho việc change password của ad từ các hệ thống vpnlaonap166
870 views30 slides
Kubernetes training by
Kubernetes trainingKubernetes training
Kubernetes trainingDes Drury
1.1K views53 slides

More Related Content

What's hot

OpenStack and MySQL by
OpenStack and MySQLOpenStack and MySQL
OpenStack and MySQLMatt Lord
3.1K views74 slides
Networking in Docker Containers by
Networking in Docker ContainersNetworking in Docker Containers
Networking in Docker ContainersAttila Kanto
2K views35 slides
ADB(Android Debug Bridge): How it works? by
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?Tetsuyuki Kobayashi
31.3K views44 slides
Deep Dive on Amazon EC2 instances by
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
2.4K views50 slides
MySQL Database Architectures - InnoDB ReplicaSet & Cluster by
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterKenny Gryp
2.6K views62 slides
Yahoo Cloud Serving Benchmark by
Yahoo Cloud Serving BenchmarkYahoo Cloud Serving Benchmark
Yahoo Cloud Serving Benchmarkkevin han
6.8K views18 slides

What's hot(20)

OpenStack and MySQL by Matt Lord
OpenStack and MySQLOpenStack and MySQL
OpenStack and MySQL
Matt Lord3.1K views
Networking in Docker Containers by Attila Kanto
Networking in Docker ContainersNetworking in Docker Containers
Networking in Docker Containers
Attila Kanto2K views
MySQL Database Architectures - InnoDB ReplicaSet & Cluster by Kenny Gryp
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
Kenny Gryp2.6K views
Yahoo Cloud Serving Benchmark by kevin han
Yahoo Cloud Serving BenchmarkYahoo Cloud Serving Benchmark
Yahoo Cloud Serving Benchmark
kevin han6.8K views
Stateful set in kubernetes implementation & usecases by Krishna-Kumar
Stateful set in kubernetes implementation & usecases Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases
Krishna-Kumar 4.3K views
Black Hat Europe 2017. DPAPI and DPAPI-NG: Decryption Toolkit by Paula Januszkiewicz
Black Hat Europe 2017. DPAPI and DPAPI-NG: Decryption ToolkitBlack Hat Europe 2017. DPAPI and DPAPI-NG: Decryption Toolkit
Black Hat Europe 2017. DPAPI and DPAPI-NG: Decryption Toolkit
Data Reduction for Gluster with VDO by Gluster.org
Data Reduction for Gluster with VDOData Reduction for Gluster with VDO
Data Reduction for Gluster with VDO
Gluster.org5K views
MMUG18 - MySQL Failover and Orchestrator by Simon J Mudd
MMUG18 - MySQL Failover and OrchestratorMMUG18 - MySQL Failover and Orchestrator
MMUG18 - MySQL Failover and Orchestrator
Simon J Mudd1.4K views
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo... by The Linux Foundation
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
Architecture, bonnes pratiques et recettes pour la réussite de vos projets av... by Microsoft Technet France
Architecture, bonnes pratiques et recettes pour la réussite de vos projets av...Architecture, bonnes pratiques et recettes pour la réussite de vos projets av...
Architecture, bonnes pratiques et recettes pour la réussite de vos projets av...
MySQL Operator for Kubernetes by Kenny Gryp
MySQL Operator for KubernetesMySQL Operator for Kubernetes
MySQL Operator for Kubernetes
Kenny Gryp594 views
IBM MQ Online Tutorials by BigClasses.com
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online Tutorials
BigClasses.com11.2K views
Extreme Linux Performance Monitoring and Tuning by Milind Koyande
Extreme Linux Performance Monitoring and TuningExtreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and Tuning
Milind Koyande2K views
카카오에서의 Trove 운영사례 by Won-Chon Jung
카카오에서의 Trove 운영사례카카오에서의 Trove 운영사례
카카오에서의 Trove 운영사례
Won-Chon Jung1.4K views
Kubernetes - A Comprehensive Overview by Bob Killen
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
Bob Killen26.5K views
Web Server Technologies I: HTTP & Getting Started by Port80 Software
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting Started
Port80 Software3.1K views
Docker: From Zero to Hero by fazalraja
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
fazalraja1.9K views

Viewers also liked

Rspamd symbols by
Rspamd symbolsRspamd symbols
Rspamd symbolsVsevolod Stakhov
2.6K views24 slides
ast-rspamd by
ast-rspamdast-rspamd
ast-rspamdVsevolod Stakhov
1.1K views19 slides
New solver for FreeBSD pkg by
New solver for FreeBSD pkgNew solver for FreeBSD pkg
New solver for FreeBSD pkgVsevolod Stakhov
2.6K views31 slides
rspamd-hyperscan by
rspamd-hyperscanrspamd-hyperscan
rspamd-hyperscanVsevolod Stakhov
2.1K views15 slides
Cryptography and secure systems by
Cryptography and secure systemsCryptography and secure systems
Cryptography and secure systemsVsevolod Stakhov
1.3K views41 slides
Pkg slides from BSDCan conference by
Pkg slides from BSDCan conferencePkg slides from BSDCan conference
Pkg slides from BSDCan conferenceVsevolod Stakhov
929 views36 slides

Similar to Rspamd testing

Getting by with just psql by
Getting by with just psqlGetting by with just psql
Getting by with just psqlCorey Huinker
259 views28 slides
Galera Multi Master Synchronous My S Q L Replication Clusters by
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication ClustersPerconaPerformance
1.5K views15 slides
Spark core by
Spark coreSpark core
Spark coreFreeman Zhang
614 views93 slides
DataStax: Ramping up Cassandra QA by
DataStax: Ramping up Cassandra QADataStax: Ramping up Cassandra QA
DataStax: Ramping up Cassandra QADataStax Academy
669 views28 slides
Learning Kafka Streams with Scala by
Learning Kafka Streams with ScalaLearning Kafka Streams with Scala
Learning Kafka Streams with ScalaKnoldus Inc.
2.4K views32 slides
The Best Feature of Go – A 5 Year Retrospective by
The Best Feature of Go – A 5 Year RetrospectiveThe Best Feature of Go – A 5 Year Retrospective
The Best Feature of Go – A 5 Year RetrospectiveTahir Hashmi
1.9K views24 slides

Similar to Rspamd testing(20)

Getting by with just psql by Corey Huinker
Getting by with just psqlGetting by with just psql
Getting by with just psql
Corey Huinker259 views
Galera Multi Master Synchronous My S Q L Replication Clusters by PerconaPerformance
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication Clusters
PerconaPerformance1.5K views
Learning Kafka Streams with Scala by Knoldus Inc.
Learning Kafka Streams with ScalaLearning Kafka Streams with Scala
Learning Kafka Streams with Scala
Knoldus Inc.2.4K views
The Best Feature of Go – A 5 Year Retrospective by Tahir Hashmi
The Best Feature of Go – A 5 Year RetrospectiveThe Best Feature of Go – A 5 Year Retrospective
The Best Feature of Go – A 5 Year Retrospective
Tahir Hashmi1.9K views
Performance Test Driven Development with Oracle Coherence by aragozin
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherence
aragozin7.5K views
Q4.11: Getting Started in LAVA by Linaro
Q4.11: Getting Started in LAVAQ4.11: Getting Started in LAVA
Q4.11: Getting Started in LAVA
Linaro2.4K views
Load Testing Cassandra Applications by Instaclustr
Load Testing Cassandra Applications Load Testing Cassandra Applications
Load Testing Cassandra Applications
Instaclustr377 views
Load Testing Cassandra Applications (Ben Slater, Instaclustr) | C* Summit 2016 by DataStax
Load Testing Cassandra Applications (Ben Slater, Instaclustr) | C* Summit 2016Load Testing Cassandra Applications (Ben Slater, Instaclustr) | C* Summit 2016
Load Testing Cassandra Applications (Ben Slater, Instaclustr) | C* Summit 2016
DataStax1.6K views
Load testing Cassandra applications by Ben Slater
Load testing Cassandra applicationsLoad testing Cassandra applications
Load testing Cassandra applications
Ben Slater113 views
Puppet Camp DC 2015: Distributed OpenSCAP Compliance Validation with MCollective by Puppet
Puppet Camp DC 2015: Distributed OpenSCAP Compliance Validation with MCollectivePuppet Camp DC 2015: Distributed OpenSCAP Compliance Validation with MCollective
Puppet Camp DC 2015: Distributed OpenSCAP Compliance Validation with MCollective
Puppet1.1K views
AWS re:Invent 2016: Cross-Region Replication with Amazon DynamoDB Streams (DA... by Amazon Web Services
AWS re:Invent 2016: Cross-Region Replication with Amazon DynamoDB Streams (DA...AWS re:Invent 2016: Cross-Region Replication with Amazon DynamoDB Streams (DA...
AWS re:Invent 2016: Cross-Region Replication with Amazon DynamoDB Streams (DA...
Amazon Web Services5.3K views
ShadowReader - Serverless load tests for replaying production traffic by Yuki Sawa
ShadowReader - Serverless load tests for replaying production trafficShadowReader - Serverless load tests for replaying production traffic
ShadowReader - Serverless load tests for replaying production traffic
Yuki Sawa402 views
Optimizing, Profiling, and Deploying High Performance Spark ML and TensorFlow AI by Data Con LA
Optimizing, Profiling, and Deploying High Performance Spark ML and TensorFlow AIOptimizing, Profiling, and Deploying High Performance Spark ML and TensorFlow AI
Optimizing, Profiling, and Deploying High Performance Spark ML and TensorFlow AI
Data Con LA1.4K views
PipelineAI + AWS SageMaker + Distributed TensorFlow + AI Model Training and S... by Chris Fregly
PipelineAI + AWS SageMaker + Distributed TensorFlow + AI Model Training and S...PipelineAI + AWS SageMaker + Distributed TensorFlow + AI Model Training and S...
PipelineAI + AWS SageMaker + Distributed TensorFlow + AI Model Training and S...
Chris Fregly2.5K views
Apache Flink vs Apache Spark - Reproducible experiments on cloud. by Shelan Perera
Apache Flink vs Apache Spark - Reproducible experiments on cloud.Apache Flink vs Apache Spark - Reproducible experiments on cloud.
Apache Flink vs Apache Spark - Reproducible experiments on cloud.
Shelan Perera8.2K views
Sharing (less) Pain of using Protractor & WebDriver by Anand Bagmar
Sharing (less) Pain of using Protractor & WebDriverSharing (less) Pain of using Protractor & WebDriver
Sharing (less) Pain of using Protractor & WebDriver
Anand Bagmar2.1K views
HKG15-204: OpenStack: 3rd party testing and performance benchmarking by Linaro
HKG15-204: OpenStack: 3rd party testing and performance benchmarkingHKG15-204: OpenStack: 3rd party testing and performance benchmarking
HKG15-204: OpenStack: 3rd party testing and performance benchmarking
Linaro3.8K views

Recently uploaded

An approach of ontology and knowledge base for railway maintenance by
An approach of ontology and knowledge base for railway maintenanceAn approach of ontology and knowledge base for railway maintenance
An approach of ontology and knowledge base for railway maintenanceIJECEIAES
12 views14 slides
802.11 Computer Networks by
802.11 Computer Networks802.11 Computer Networks
802.11 Computer NetworksTusharChoudhary72015
9 views33 slides
LFA-NPG-Paper.pdf by
LFA-NPG-Paper.pdfLFA-NPG-Paper.pdf
LFA-NPG-Paper.pdfharinsrikanth
40 views13 slides
CHI-SQUARE ( χ2) TESTS.pptx by
CHI-SQUARE ( χ2) TESTS.pptxCHI-SQUARE ( χ2) TESTS.pptx
CHI-SQUARE ( χ2) TESTS.pptxssusera597c5
29 views33 slides
2_DVD_ASIC_Design_FLow.pdf by
2_DVD_ASIC_Design_FLow.pdf2_DVD_ASIC_Design_FLow.pdf
2_DVD_ASIC_Design_FLow.pdfUsha Mehta
19 views24 slides
A multi-microcontroller-based hardware for deploying Tiny machine learning mo... by
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...IJECEIAES
12 views10 slides

Recently uploaded(20)

An approach of ontology and knowledge base for railway maintenance by IJECEIAES
An approach of ontology and knowledge base for railway maintenanceAn approach of ontology and knowledge base for railway maintenance
An approach of ontology and knowledge base for railway maintenance
IJECEIAES12 views
CHI-SQUARE ( χ2) TESTS.pptx by ssusera597c5
CHI-SQUARE ( χ2) TESTS.pptxCHI-SQUARE ( χ2) TESTS.pptx
CHI-SQUARE ( χ2) TESTS.pptx
ssusera597c529 views
2_DVD_ASIC_Design_FLow.pdf by Usha Mehta
2_DVD_ASIC_Design_FLow.pdf2_DVD_ASIC_Design_FLow.pdf
2_DVD_ASIC_Design_FLow.pdf
Usha Mehta19 views
A multi-microcontroller-based hardware for deploying Tiny machine learning mo... by IJECEIAES
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
IJECEIAES12 views
How I learned to stop worrying and love the dark silicon apocalypse.pdf by Tomasz Kowalczewski
How I learned to stop worrying and love the dark silicon apocalypse.pdfHow I learned to stop worrying and love the dark silicon apocalypse.pdf
How I learned to stop worrying and love the dark silicon apocalypse.pdf
STUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptx by AnnieRachelJohn
STUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptxSTUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptx
STUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptx
AnnieRachelJohn31 views
Update 42 models(Diode/General ) in SPICE PARK(DEC2023) by Tsuyoshi Horigome
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Informed search algorithms.pptx by Dr.Shweta
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptx
Dr.Shweta13 views
cloud computing-virtualization.pptx by RajaulKarim20
cloud computing-virtualization.pptxcloud computing-virtualization.pptx
cloud computing-virtualization.pptx
RajaulKarim2085 views
Machine Element II Course outline.pdf by odatadese1
Machine Element II Course outline.pdfMachine Element II Course outline.pdf
Machine Element II Course outline.pdf
odatadese17 views
_MAKRIADI-FOTEINI_diploma thesis.pptx by fotinimakriadi
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptx
fotinimakriadi6 views
Dynamics of Hard-Magnetic Soft Materials by Shivendra Nandan
Dynamics of Hard-Magnetic Soft MaterialsDynamics of Hard-Magnetic Soft Materials
Dynamics of Hard-Magnetic Soft Materials
Shivendra Nandan13 views
13_DVD_Latch-up_prevention.pdf by Usha Mehta
13_DVD_Latch-up_prevention.pdf13_DVD_Latch-up_prevention.pdf
13_DVD_Latch-up_prevention.pdf
Usha Mehta10 views
MSA Website Slideshow (16).pdf by msaucla
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdf
msaucla46 views
fakenews_DBDA_Mar23.pptx by deepmitra8
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptx
deepmitra812 views

Rspamd testing