A
A
Alexey Lesovsky2013-06-04 08:08:04
Amazon Web Services
Alexey Lesovsky, 2013-06-04 08:08:04

storage of statics in S3

Hello!
There was a task to take out the storage of statics in Amazon S3.

According to preliminary sketches, it looks something like this:
There is a basket in S3, it is mounted on the server via s3fs. Servers change the data there. EC2 also has a machine with a mounted basket, this machine is used to distribute content to the CDN provider (which then distributes content from its sites).

So, a few things that are incomprehensible to me pop up here
- how are locks implemented in S3? What happens if 2 or more nodes want to fix the same file?
- how to give statics to frontends, i.e. as I understand it, they pull the files via s3fs, cache them in pagecache/nginx/etc and give them to the client?

Tell me if there are articles that describe similar solutions, or can someone share their own experience?

PS while I'm reading articles from Habr's search results for the query "s3"

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vyacheslav Slinko, 2013-06-04
@KeepYourMind

1) Why s3fs? Use the native API.
2) Whoever is last is dad. As far as I know, there are no locks, it's a dumb storage.
3) Why is there an extra link in the form of "pagecache/nginx/etc"? Give directly from s3.

P
Puma Thailand, 2013-06-04
@opium

You came up with garbage, for this Amazon has already come up with cloudfront.
It is configured easily and not forcibly
habrahabr.ru/post/136933/
you only need to change the path on the site.

A
Alexey Lesovsky, 2013-06-04
@lesovsky

opium and alex_bel, I know how CDN works, I'm talking about the fact that in the case of Amazon CloudFront (whose DCs are not in Russia), the response for Russian clients will be large, unlike using the same Ngenix (whose capacities are plentiful in Russia)
>> You attributed plus cloudfront for some reason to its minus.
in this case, the minus is not a separate cloudfront, but the entire Amazon as a whole (the minus is that it is absent in Russia)

Z
Zelgadis, 2013-06-04
@Zelgadis

Perverts.
It is necessary to upload through the native API, if possible, you can upload directly from the client.
It is necessary to give through any CDN or put your own proxy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question