4 ms·
Nice, but why? https://cloudinary.com https://cloudinary.com, https://www.imgix.com https://www.imgix.com, or https://www.filestack.com https://www.filestack.co
by manigandham 9y ago
Nice, but why? https://cloudinary.com https://cloudinary.com, https://www.imgix.com https://www.imgix.com, or https://www.filestack.com https://www.filestack.com already exist and are well worth it for 99% of apps. Even at scale, it really doesn't cost that much to have someone else do it. You can use a thin proxy through your existing CDN if you want to save on their bandwidth fees.
Also http://thumbor.org http://thumbor.org and https://imageresizing.net https://imageresizing.net if you want a library to host yourself which are already very fast and well tested. Put them in a docker container on a kubernetes cluster and it's all done in an hour.
- zitterbewegung 9y agoMaybe it’s because that they don’t want a dependency on a external service that could go down ?
- StreamBright 9y agoSo you have an internal dependency that could go down?
- Volt 9y agoIt's better when you can do something about it.
- StreamBright 9y agoIt depends.
- manigandham 9y agoIt's images... seems like a very low risk situation, especially when they are served from a CDN.
- deleted 9y ago[deleted]
- reificator 9y agoAs a user, the order of importance for Discord services is: * Voice * Text * Previews (images, gifs, and videos) Previews going down would be a pretty big deal for my communities based on the way we use the platform.
- manigandham 9y agoIt’s just resizing, you still have the source images and can use those.
- mercwear 9y agoI agree. Offloading this type of work to a third party who does it really well is a smart move. Why manage additional code when it's not even core to what you do?
- bpicolo 9y agoIn this case, it was perhaps cheaper for them to do in-house, and it's not rocket science? They wrote a bleeding edge library for it - sounds like they have the expertise just fine. Minimizing external dependencies can be a big deal if you have the developers to manage it. Also, it is totally core to what they do. Images are a huge part of the Discord UX.
- jhgg 9y agoAt 150m images per day, not counting bandwidth, imgix would cost ~135k/month. Running 12 n1-standard-16 instances (peak load according to the article) is ~$5k/month. It's not hard to see why we wrote it in house when you consider that cost.
- manigandham 9y agoOk, so why a new library and associated dev time when thumbor and other libraries already exist, especially if you're willing to spend 5k/month on instances just for this?
- bpicolo 9y agoThat was pretty clear in the post - they didn't find a Golang lib that could compete with their pillow-simd on resizing, which was the main performance bottleneck.
- manigandham 9y agoWhy was a Go version needed if performance was paramount? There are libraries already that can handle this performance just fine. If they're going to spend 60k/year on instances, the dev time definitely wasn't worth it for this. They just wanted to use that language because this is a NIH situation, not really an engineering priority.