Live data from Hacker News

Lorem Picsum, death by a million pixel-gigabits

dmarby.se

31–40 of 55 posts

Re: Lorem Picsum, death by a million pixel-gigabits

#31
post #22

Earlier quoted context omitted.

I run https://dummyimage.com , the first placeholder image service which has been online since 2007. I use a 1GB, 1vCPU instance from DreamCompute costing $6.00 per month. That's it. To be fair dummyimage.com doesn't do any sort of image reading or resizing. Source doe at https://github.com/kingkool68/dummyimage

What kind of traffic does your service attract?

If I had to guess by his infrastructure, none.

Re: Lorem Picsum, death by a million pixel-gigabits

#33
post #20

Earlier quoted context omitted.

Well let's limit the possibilities to any image between 1x1 and 1920x1080. Calculating the number of possible images is simple enough. It's just 1920*1080, or 2073600 images. Now what's the average size of each image? Well the average of each dimension is half of the full size, so the average area should be 1/4th to of a 1920x1080 image, or 518400 pixels per image. So in total, we need to save 1074954240000 pixels. N…

I'll bet that most image requests will be within certain parameters. 2^x by 2^y. So you could probably pre-cache most real-world image sizes, and leave dynamic generation for 1-offs.

Well, that's what they're doing.

Re: Lorem Picsum, death by a million pixel-gigabits

#34
post #22

Earlier quoted context omitted.

I run https://dummyimage.com , the first placeholder image service which has been online since 2007. I use a 1GB, 1vCPU instance from DreamCompute costing $6.00 per month. That's it. To be fair dummyimage.com doesn't do any sort of image reading or resizing. Source doe at https://github.com/kingkool68/dummyimage

What kind of traffic does your service attract?

For reference: I do about 7GB of image traffic/day for placekitten (a similar service) for about the same cost ($6/mo). I do resize images.

Re: Lorem Picsum, death by a million pixel-gigabits

#36
post #8

I wonder how much it would cost to do a similar service and just upload all images and dimension possibilities to S3 + use cloudfront cdn.

I run a similar image host with many times the traffic of picsum as well as daily DDOS attempts. This is pretty much the approach I've chosen. (I don't use S3, but a similar setup.)

My infrastructure is much simpler than this (CDN in front of Varnish? What the hell software do you think they're using for the CDN?) and my total hosting costs are about $150 a month since recently upgrading the server.

Seeing articles like this just reaffirms for me: The people who write these articles are not necessarily experts.

Re: Lorem Picsum, death by a million pixel-gigabits

#37
post #36
post #8

I wonder how much it would cost to do a similar service and just upload all images and dimension possibilities to S3 + use cloudfront cdn.

I run a similar image host with many times the traffic of picsum as well as daily DDOS attempts. This is pretty much the approach I've chosen. (I don't use S3, but a similar setup.) My infrastructure is much simpler than this (CDN in front of Varnish? What the hell software do you think they're using for the CDN?) and my total hosting costs are about $150 a month since recently upgrading the server. Seeing articles l…

What you mean by similar set up of S3?

Re: Lorem Picsum, death by a million pixel-gigabits

#39
More interestingly, the github repo is just a wonderful example of a fully built application using modern techniques in a microservices architecture: https://github.com/DMarby/picsum-photos

It's so hard to always find how all the pieces fit together and this repo has it all. Really impressive.

Re: Lorem Picsum, death by a million pixel-gigabits

#40
post #36
post #8

I wonder how much it would cost to do a similar service and just upload all images and dimension possibilities to S3 + use cloudfront cdn.

I run a similar image host with many times the traffic of picsum as well as daily DDOS attempts. This is pretty much the approach I've chosen. (I don't use S3, but a similar setup.) My infrastructure is much simpler than this (CDN in front of Varnish? What the hell software do you think they're using for the CDN?) and my total hosting costs are about $150 a month since recently upgrading the server. Seeing articles l…

Using CDN doesn't guarantee that users requests will hit your server only once.
Post reply on HN