rgw static-website hosting design WIP: how S3-like should we be with endpoint types?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm working on implementing S3 Static Website hosting on top of RGW,
based on the initial work that Yehuda did (wip-static-website branch).

I have a scratchpad here:
https://github.com/robbat2/temp-ceph-rgw-static-website-wiki/wiki
WIP Codebase here:
https://github.com/robbat2/ceph/tree/wip-static-website-robbat2-master

As part of writing up a full design for it, I'm wondering if we should
try to be "as close to S3 as possible", or try to improve the experience
for the administrator rather.

In S3, they explicitly add some DNS endpoints that are used for
accessing the bucket in website mode. Via those special endpoints, there
are MANY constraints applied [1], and you pretty much can't use them for
anything else.

At this point in early implementation, it seems possible that rather
than requiring organizations to have a separate DNS subdomain/wildcard
scope for websites, that we can make the decision based on headers:
If(bucket has website metadata set) {
  if(request has auth headers) {
    use normal REST mode
  } else {
    use website mode
  } 
}

I've got it mostly working to make this behavior, but I'm wondering
about fallout/breakage, and unintended consequences. The codebase is
pretty ready for plugging the alternative logic with hostnames in as
well.

The most notable one so far, is that under Amazon's S3, the website
endpoint will server up only fixed pages for directories (no listing);
and the regular REST endpoint will serve listings if the
bucket/directory has a public ACL.

Another side-effect, and I think that's an improvement, is that if you
use a browser to just access a bucket this way, you'll automatically get
HTML error pages, instead of the XML blobs (as an admin of a RGW install
previously, the non-technical users telling me the rendered HTML from
their errors would have been a huge help instead of them being scared of
the XML).

[1] The list of S3 website endpoint constraints is here:
http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Infrastructure Lead
E-Mail     : robbat2@xxxxxxxxxx
GnuPG FP   : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux