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