Benoit Tellier created JAMES-4223:
-------------------------------------

             Summary: S3: Leverage optionally If-None-Match header
                 Key: JAMES-4223
                 URL: https://issues.apache.org/jira/browse/JAMES-4223
             Project: James Server
          Issue Type: Improvement
          Components: s3
            Reporter: Benoit Tellier


h3. Why?

With deduplication enabled, James does 1 PUT each time it stores a given mail:
 - That's innefficient as the underlying S3 would overwrite its content...
 - That's harmfull with versionning on as each store would result in a new 
version

h3. What?

Have a ` objectstorage.s3.ifNoneMatch.enable` option in blob.properties to set

`If-None-Match: *` headers on PUT.

This enforce S3 never overwrite an object and instead returns a 412 
Precondition fail that we'd consider a success.

h3. Consequences

Ability to create a Contingency Plan without versions: 
 - s3:if-none-match policy rejects PUT without the If-None-Match header 
enforcing content immutability (in your head, crypto lockers)
 - s3:DeleteObject enforces no deletions and GC / deletes are done in a 
non-internet exposed process.

h3. Alternative?

HEAD before PUT had been disregarded for performance reasons: it puts double 
the amount of work on the S3 metadata

LINAGORA have a Cassandra stored blobId list extension not to do the same PUT 
twice, thought as a performance optimization in its Twake Mail product. While 
it works great it's a perf optimisation and consistency guaranty can not 
enforce that we wont be doing the same PUT twice. blobIdList is tiered  but it 
can be coupled with GC generation however upon C* errors we might duplicate 
PUT. Cassandra storage dedicated to this is non neglictible. My though is that 
the two could be complementary: blobIdList empowers skipping content streaming.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to