[exim-dev] [Bug 2248] New: Lightweight redis cluster redirect method

2018-03-05 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2248

Bug ID: 2248
   Summary: Lightweight redis cluster redirect method
   Product: Exim
   Version: 4.90
  Hardware: x86
OS: All
Status: NEW
  Severity: wishlist
  Priority: medium
 Component: Lookups
  Assignee: ni...@exim.org
  Reporter: gra...@graemef.net
CC: exim-dev@exim.org

Created attachment 1072
  --> https://bugs.exim.org/attachment.cgi?id=1072=edit
DEFER rather than ERROR on redis cluster MOVED response.

Patch against 4.90.1 lookups/redis.c

Synopsis: DEFER rather than ERROR on redis cluster MOVED response.

This is a "cheap" way of following 'MOVED' cluster redirect in Redis Cluster.

When redis_servers is set to a list of > 1 element, and the Redis servers in
that list are in cluster configuration (not describing that here), a query -
whether a lookup or setting anything - against the first or subsequent server
in the list can receive a response of the form:

MOVED 7506 192.168.76.5:7002

i.e. MOVED [shard] [server]:[port]

In order to not put full redis cluster client functionality into Exim, this
patch turns the REDIS_REPLY_ERROR case of MOVED into a DEFER case instead, thus
moving the query onto the next server in the list.
Eventually, depending on the number of servers in the cluster, the lookup will
land on the server with that shard and will then complete the lookup.

NOTE: For a cluster of N elements, all N servers must be defined in
redis_servers.

This is soak testing on live traffic as I type and has generated no errors.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


Re: [exim-dev] delivery event for retry timeout

2018-03-05 Thread Jeremy Harris via Exim-dev
On 21/02/18 06:47, Jasen Betts via Exim-dev wrote:
>> Why not just "msg:rcpt:timeout" ?  What distinction were
>> you implying?
> 
> That suggests to me a TCP or SMTP timeout which will normally
> be retried.  retry timeout exceeded is permanent. maybe 
> "msg:rcpt:expired" is better?
> 
> Do you want me to write up a patch and submit it to the bug tracker.
> 
> I guess I should because that way I can include updates to the
> documentation.

Yes please.  On the name, my arguments would be that a TCP-level
timeout would have a name starting "tcp" (we already have tcp:connect
and tcp:close)... but it doesn't matter too much.  Your original
is fine (and leaves other possibilities open).
-- 
Cheers,
  Jeremy

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##