Live data from Hacker News

Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

github.com

11–20 of 105 posts

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#11
post #9

Presumably smaller and quicker because it's not doing any checksumming

does it make sense or should that be optional?

checksumming does make sense because it ensures that the file you've transferred is complete and what was expected. if the checksum of the file you've downloaded differs from the server gave you, you should not process the file further and throw an error (worst case would probably be a man in the middle attack, not so worse cases being packet loss i guess)

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#13
post #11
post #9

Earlier quoted context omitted.

does it make sense or should that be optional?

checksumming does make sense because it ensures that the file you've transferred is complete and what was expected. if the checksum of the file you've downloaded differs from the server gave you, you should not process the file further and throw an error (worst case would probably be a man in the middle attack, not so worse cases being packet loss i guess)

yes, you are right!

On the other hand S3 uses checksums only to verify expected upload (on the write from client -> server) ... and suprisingly you can do that in paralel after the upload - by checking the MD5 hash of blob to ETag (*with some caveats)

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#14
post #11
post #9

Earlier quoted context omitted.

does it make sense or should that be optional?

checksumming does make sense because it ensures that the file you've transferred is complete and what was expected. if the checksum of the file you've downloaded differs from the server gave you, you should not process the file further and throw an error (worst case would probably be a man in the middle attack, not so worse cases being packet loss i guess)

> checksumming does make sense because it ensures that the file you've transferred is complete and what was expected.

TCP has a checksum for packet loss, and TLS protects against MITM.

I've always found this aspect of S3's design questionable. Sending both a content-md5 AND a x-amz-content-sha256 header and taking up gobs of compute in the process, sheesh...

It's also part of the reason why running minio in its single node single drive mode is a resource hog.

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#15
post #11
post #9

Earlier quoted context omitted.

does it make sense or should that be optional?

checksumming does make sense because it ensures that the file you've transferred is complete and what was expected. if the checksum of the file you've downloaded differs from the server gave you, you should not process the file further and throw an error (worst case would probably be a man in the middle attack, not so worse cases being packet loss i guess)

TLS ensures that stream was not altered. Any further checksums are redundant.

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#16
post #11

Earlier quoted context omitted.

checksumming does make sense because it ensures that the file you've transferred is complete and what was expected. if the checksum of the file you've downloaded differs from the server gave you, you should not process the file further and throw an error (worst case would probably be a man in the middle attack, not so worse cases being packet loss i guess)

TLS ensures that stream was not altered. Any further checksums are redundant.

Thats true, but wouldn't it be still required if you're having a internal S3 service which is used by internal services and does not have HTTPS (as it is not exposed to the public)? I get that the best practice would be to also use HTTPS there but I'd guess thats not the norm?

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#17
Somewhat related, I just came across s5cmd[1] which is mainly focused on performance and fast upload/download and sync of s3 buckets.

> 32x faster than s3cmd and 12x faster than aws-cli. For downloads, s5cmd can saturate a 40Gbps link (~4.3 GB/s), whereas s3cmd and aws-cli can only reach 85 MB/s and 375 MB/s respectively.

[1] https://github.com/peak/s5cmd

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#18
post #16

Earlier quoted context omitted.

TLS ensures that stream was not altered. Any further checksums are redundant.

Thats true, but wouldn't it be still required if you're having a internal S3 service which is used by internal services and does not have HTTPS (as it is not exposed to the public)? I get that the best practice would be to also use HTTPS there but I'd guess thats not the norm?

Theoretically TCP packets have checksums, however it's fairly weak. So for HTTP, additional checksums make sense. Although I'm not sure, if there are any internal AWS S3 deployments working over HTTP and why would they complicate their protocol for everyone to help such a niche use case.

I'm sure that they have reasons for this whole request signature scheme over traditional "Authorization: Bearer $token" header, but I never understood it.

Re: Show HN: S3mini – Tiny and fast S3-compatible client, no-deps, edge-ready

#19
post #16

Earlier quoted context omitted.

Thats true, but wouldn't it be still required if you're having a internal S3 service which is used by internal services and does not have HTTPS (as it is not exposed to the public)? I get that the best practice would be to also use HTTPS there but I'd guess thats not the norm?

Theoretically TCP packets have checksums, however it's fairly weak. So for HTTP, additional checksums make sense. Although I'm not sure, if there are any internal AWS S3 deployments working over HTTP and why would they complicate their protocol for everyone to help such a niche use case. I'm sure that they have reasons for this whole request signature scheme over traditional "Authorization: Bearer $token" header, but…

Because a bearer token is a bearer token to do any request, while a pre-signed request allows you to hand out the capability to perform _only that specific request_.
Post reply on HN