Question about servicing images in App Engine (2 alternatives)

Planning the launch of a comic site that serves comics (images). I have little experience in servicing / caching images.

so these are my 2 methods that I consider:

1. Using LinkProperty

class Comic(db.Model)
  image_link = db.LinkProperty()
  timestamp = db.DateTimeProperty(auto_now=True)

Advantages: Images are obtained from the disk space itself (and disk space is cheap, do I accept it?) I can easily configure app.yaml with an expiration date for caching content in the user's browser I can configure memcache to receive objects faster (for high traffic)

2. Using BlobProperty

I used this lesson, it worked pretty neatly. http://code.google.com/appengine/articles/images.html

: , BlobProperty "" ? ,

2.

  • , , memcache .

:

  • memcaching ? (100-200 ). , memcache 4 ? 1 memcached ...

  • , memkache appengine ? → : .

  • ? . 1, app.yaml , .

. 1 2? 1 , ?

[] ?

: , , - .ly, ( / , )

+3
3

(). , appengine , , , 1000, , , . , , # 1.

№ 2 , , . , (CDN). Amazon S3 edgecast.com - CDN, . , appengine, IP-, , , URL- cdn . CDN . , , , , 100% -, , , .

appengine cdn appengine URL- , cdn.

URL. :

http://jets3t.s3.amazonaws.com/toolkit/code-samples.html#signed-urls

http://www.edgecast.com/edgecast_difference.htm - " "

+3

, , :

  • Flash, - , , . .

  • . , -, , - . , .

, , , , , AdBlock.

, . , , , appcfg.py. AppEngine , . . , memcache, , , .

, , , , . , , , . , HTTP , , , , , .

, , , , . , , , , . , , , , . . , .

+2

№1 : .

№2 . "" hotlinked - URL-, , , , , .

The third option and option # 2 is to use the new Blob API . Instead of saving the image itself to the data store, you can save the blob key, and the image processor will simply instruct the blobstore infrastructure which image will be served.

0
source

Source: https://habr.com/ru/post/1729895/


All Articles