@@ -100,24 +100,37 @@ binary. For third-party providers, refers to the following table:
100
100
Sendgrid smtp://apikey:KEY@sendgrid n/a api://KEY@sendgrid
101
101
==================== ================================== ================================== ================================
102
102
103
- Failover Transport
104
- ------------------
103
+ Load Balancing
104
+ --------------
105
105
106
- You can create failover transport with the help of `|| ` operator::
106
+ Symfony's mailer supports `load balancing `_ so you can distribute the mailing
107
+ workload across multiple transports. There are two main techniques to balance
108
+ the load: failover and round-robin.
109
+
110
+ Failover Load Balancing
111
+ ~~~~~~~~~~~~~~~~~~~~~~~
112
+
113
+ A failover transport is configured with two or more transports joined by the
114
+ ``|| `` operator::
107
115
108
116
$dsn = 'api://id@postmark || smtp://key@sendgrid';
109
117
110
- So if the first transport fails, the mailer will attempt to send through the
111
- second transport.
118
+ The mailer will start using the first transport. If the sending fails, the
119
+ mailer won't retry it with the other transports, but it will switch to the next
120
+ transport automatically for the following deliveries.
112
121
113
- Round Robin
114
- -----------
122
+ Round- Robin Load Balancing
123
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
115
124
116
- If you want to send emails by using multiple transports in a round-robin fashion,
117
- you can use the ``&& `` operator between the transports ::
125
+ A round-robin transport is configured with two or more transports joined by the
126
+ ``&& `` operator::
118
127
119
128
$dsn = 'api://id@postmark && smtp://key@sendgrid'
120
129
130
+ The mailer will start using the first transport and if it fails, it will retry
131
+ the same delivery with the next transports until one of them succeeds (or until
132
+ all of them fail).
133
+
121
134
Sending emails asynchronously
122
135
-----------------------------
123
136
@@ -167,3 +180,5 @@ Learn More
167
180
168
181
To learn more about how to use the mailer component, refer to the
169
182
:doc: `Symfony Framework Mailer documentation </mailer >`.
183
+
184
+ .. _`load balancing` : https://en.wikipedia.org/wiki/Load_balancing_(computing)
0 commit comments