Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The Architecture of IMGZ (imgz.org)
202 points by sirodoht on Dec 7, 2020 | hide | past | favorite | 92 comments


This is amazing :) "At IMGZ, we're passionate about two things: Serving images, and speaking about ourself in the plural so it doesn't look like it's the one-man sideproject it is, and we don't even really care about serving images that much. "


We are glad you liked this sentence.


I found that I like the architecture diagram more.

I thought it was a real deal when watching the thumbnail and when I zoom in...

It IS the real deal!


Hey everyone, I run the best image host in the world, IMGZ, and wrote this article. I can answer questions and comment on our journey. I can only describe it in two words:

In


How do you decide which resolutions the thumbnails no one is ever going to request will be?


I only have one right now, 512px. 512px ought to be enough for anybody:

https://gitlab.com/stavros/imgz/-/blob/master/main/models.py...


I love how inefficient your strip_exif is. I'd expected a well-engineered LibJpegAsAService presented as a serverless AWD Lambda at the very least :D

Tho I have to admit that running magick outside of a sandbox is a gutsy move.


sandbox whats that


Its a server that's been filled with sand. Helps prevent fires.


It's the thing standing between you and the next magick CVE :P


I'm going to run it in Kubernetes, I hear that's reallly safe.


credible


How do you really store the images with some type of replication ?


I have backups, who said I don't?


Replication is a different thing from backups. See "raid != backups".


An easy way to remember the difference is "replication is what cells do, backup is what trucks do".


your FAQ is very funny.


Thanks, I'm glad you like it!


I wondered all along if this was a parody, but I had to read it to the very end to be sure! You never know with articles like this these days...


Don't let the fact that the service exists and works fool you, I just take my parody seriously.


This is the most I've smiled reading anything on HN in a long time.

The architecture diagram alone is just a gem!

Kudos. :)


Thank you, I'm glad you liked it!


"we" are glad ;)


Ah, a fellow hivemind.


Is this allowed on the free tier? https://www.cloudflare.com/terms/ 2.8 says:

"Use of the Services for serving video or a disproportionate percentage of pictures, audio files, or other non-HTML content is prohibited, unless purchased separately as part of a Paid Service or expressly allowed under our Supplemental Terms for a specific Service. "


It depends on what "disproportionate" means, I guess. I'm assuming "five" is still okay.


If the site gets hugged to death I will be forever shamed.


I created a trial account and went on the account page. Smiled on reading this under the section "Delete your account": You think I'm going to try to dissuade you? I don't even want you here!. Hahaha


Such is the lifecycle of an image host. People want simple, free image hosts. So, the demand is always there. And every new simple, free image host eventually has to make money, so it becomes an ad-ridden mess. Imgur was once super simple and became the de-facto image host for Reddit overnight. It's competition back then was Imagebucket and the like. Now, it IS Imagebucket. And so we have a new challenger. (Well, Reddit has it's own image hosting - sometimes! It's limited to some clients and some subreddits, at the discretion of the mods I believe.)


(I actually got fed up that I couldn't easily upload an image to Imgur from the command line and hotlink it, so I made IMGZ, then I figured others might want to use it and made a user system; I don't really mean it as a contender, though I'd be very happy if it got lots of satisfied users)


You are mocking this cycle by 1) making it a paid offering 2) joking about it / not making it out be god's gift to humanity. :)


Oh yes, very intentionally so.


Thank you Stavros. I had a big smile on my face when i was finished reading.


Thanks! I hope it was due to the article.


Same here. Thanks a lot for making my day! If you ever start a standup career, please let me know!


Thanks, I'm really glad you all liked it!


Worth a visit for the FAQ alone.


The terms are excellent: https://imgz.org/help/terms/

And the FAQ link for the lazy: https://imgz.org/help/faq/

And the money link too: https://imgz.org/money/

And a quote from elsewhere “I am very happy to report that http://IMGZ.ORG, the best image serving host, has had the mythical "nine fives" availability ever since its launch.”


Reading those back to back had me incapacitated with laughter in a way that didn’t happen for a long time.

You made my day Stavros.


<3


The "Money" page gave me a few chuckles. I love how the last tier overflows the card, and in my case, caused horizontal scrolling. I do not expect a fix for that, because "Still no support".


Hahah I love it when people get the subtle jokes.


I love that it's two cents short of one million!


I am not a greedy man.


When is your Netflix special?


When Netflix agrees to pay me $999.999,98. I don't care how I make it, I just want to pay off the rest of that million I owe.


Thanks, have a free IMGZ trial on me for that comment.


Does anyone know a tool that can make architecture diagrams similar to the one in this article?


Yes: https://www.cloudcraft.co/

Does it look familiar? It's because stealing other people's stuff and putting text on them is the only thing I'm good at.


There's a broken image on the page. https://i.imgur.com/xwSUXHz.png


How is this possible. Maybe because it's webp?

EDIT: Try now? I've changed it to a JPG and will never use new technology again.


I love it. Imgur is a disgrace. We need micro-payments. Put in your credit card pay 1 cent / image / mo.


Bad news: in order for this to pass the threshold and be considered a real Valley-class SaaS, it's required to eventually institute a pricing plan of $4–9/mo for its introductory paid tier and force you to choose between using either that or sticking to the freerider option. You want pricing centered around resource use? What even is that?


Real Valley-class SaaSes have investors pay for users' free unlimited tiers, what even is paying for a service you use


That is not a bad idea :thinking emoji:


Quick question StavrosK: I see on this page here https://imgz.org/i9hxfgRu/ that you have a counter "Viewed 403 times". How are you able to track that behind a CDN? Won't this count how many times the CDN (instead of individual users) have hit the server? Thanks!


I checked, it does only count the view of the whole page (html and all). Just loading the jpg doesn't count.


Yep, exactly, I cache the images but not the pages. I thought that was a good compromise, and the counter is ballpark anyway.


That file name is a classic, but still glorious.

I’m loving the consistency of it all.


Original joke source: Carlos Mencia


>How are you able to track that behind a CDN?

CDNs provide access logs.


“Just make sure you never succeed.”

Dude, stop writing crap software (i remember that thing you did once where you pressed a button and shortly after had a kebab in your mouth) and write a novel instead. I think you would be a great short story SF author. No, scrub that, trashy romantic stories - the people love it and you’ve got the style.


It was a gyros damn you!

My trashy romantic story would quickly devolve into "he kissed her passionately, like another man she had known that also kissed very passionately, like this man".


Their tongues twisted like an Oroboros.


That is beautifully disgusting.


Thats the steamiest HN has ever been! Watch out, that big dude dang might just ban your ass!


Oh he'll never be able to read my comment in all this fog.


"Why are you so angry?

I'm running a fucking image sharing service. Wouldn't you be angry?"

Gold. Take my money.


Give it


> Instead, we stored the images in a small Postgres database (yes, the actual image data itself), with a small Django app handling the business logic. Sexy.

Funny stuff. Pragmatic, okay... sexy.


I sent this to every person I know and that I appreciate. Both of them.

I couldn't stop laughing, I miss stuff like this. Stavros - you are a god among mortal men, thank you for this :)


And you are my goddess.


Hehe, nice one Stavros ;-) If this catches on and you need a moderator for deleting all the nud...ehm... filtering illegal content let me know.


Why would I delete nudity? I can email you all the links though.


For purely academic purposes, of course


Of course


Hey stavros to grow the service you should make the first N images free, and watermark them for free advertising


That's a good idea but I think people hate watermarks, and watermarks aren't crazy about people either. Plus it only works if people use the service!


Good luck with everything my brother


And to you as well!


What do you feed your Correspondence Monkey? Was it ethically sourced? These are important questions


The Correspondence Monkey is on a strict diet until he types out the complete works of Shakespeare. He's done with Hamlet but is having some problems with Othello.


I'm a fan of simplicity, but it looks like you're aiming for 99% reliability.


As long as I get nine fives, I'm good.


Did not get it the first time i read it. Awesome joke!


Thanks, I'm pretty proud of it.


Have you considered using machine learning? Transformer stack LSTM network??


I did try a thirty-layer Wasserstein generative adversarial network and convolutional neural network, but it committed suicide.


"Already have an account? No you don't."

Beautiful. You made me laugh.


One thing I enjoy about these things is that I completely forget what I wrote, and I go back months later and find some bits funny. I just laughed at the pricing page saying:

NO ONE CAN OWN IMGZ

IT IS MINE


The architecture diagram is a gas! I love everything about this.


Look Ma No SEO ahahahah




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: