Live data from Hacker News

MangaDex infrastructure overview

mangadex.dev

11–20 of 241 posts

Re: MangaDex infrastructure overview

#11
They mention a $1,500 budget per month but then omit things critical to understanding how they achieve that cost point.

What is actually more interesting is to understand what portion is spent on servers versus bandwidth - and what hardware configuration they use to host the site. For example, Is $1,500/mo just paying for colo costs + bandwidth, with already owned recycled hardware (think last gen hardware that you can get at steep discounts from eBay / used hardware resellers...)

That would have been way more interesting to know given the blog title than the choice of infrastructure software they use.

Re: MangaDex infrastructure overview

#12
post #2

>more than 10 million unique monthly visitors >our ~$1500/month budget I understand not wanting to show ads, but is there no way for the users to contribute to hosting costs?

There is the MangaDex@Home, where users can serve part of disk space/bandwidth to help serve (mainly old) manga chapters. It does need to be something that is running 24/7 (e.g.: not a PC that is shutdown frequently), so something like a VPS or a service is recommended.

Re: MangaDex infrastructure overview

#13
post #2

>more than 10 million unique monthly visitors >our ~$1500/month budget I understand not wanting to show ads, but is there no way for the users to contribute to hosting costs?

A $5/mo premium plan would break even so quickly

Premium plan on content that can be considered as dubious in copyright context? Seems like a quick way to get shut down.

Re: MangaDex infrastructure overview

#14

It's a nice article, I guess, but the site is down (the one discussed in the article, not the blog post itself) for me.

You probably have Verizon - they've started null routeing traffic to sites "like this".

https://old.reddit.com/r/mangadex/comments/nvj7qf/is_verizon...

Re: MangaDex infrastructure overview

#15
Not familiar with the project but it is great to see a counterpart to over-provisioned enterprise infrastructure. $10 in 2021 can do what $100 in 2011 did, what $1000 in 2001 did, and that is not solely due to hardware. Well-designed deployments of K8s, KVM/LXC, Ceph, LBs like this project can handle so much more traffic than poorly configured Wordpress storefronts.

They're using battle-tested tech from Redis and RabbitMQ to Ansible and Grafana. Nothing super fancy, nothing used just for the sake of being modern. Not sure how long it took them to end up with this architecture but it doesn't look like a new dev would have a hard time getting familiar with how everything works.

Would definitely like to hear more about their dev environment, how it is different from prod, and how they handle the differences.

Re: MangaDex infrastructure overview

#16
post #9
post #6

I'm amazed that their architecture doesn't include a CDN. These days I expect nearly all high traffic websites to make use of a CDN for all kinds of content, even content that's not cached. They cited Cloudflare not being used due to privacy concerns. It'd be interesting to hear more about that, as well as why other CDNs weren't worth evaluating too.

It's effectively a warez site. There's a reason why they host in the places they do and can't be too picky about providers. CF will also pass through things like DMCAs easily. Based on their sidebar, it's probably hosted at Ecatel or whatever they are called now (cybercrime host) via Epik as a reseller, the provider famous for hosting far-right stuff.

What’s the reason behind where they host and having issues with providers? I haven’t heard this before

Regarding DMCA’s, as an entity doing business where they’re legal, what should they do as a middle man?

Re: MangaDex infrastructure overview

#17
post #16
post #9

Earlier quoted context omitted.

It's effectively a warez site. There's a reason why they host in the places they do and can't be too picky about providers. CF will also pass through things like DMCAs easily. Based on their sidebar, it's probably hosted at Ecatel or whatever they are called now (cybercrime host) via Epik as a reseller, the provider famous for hosting far-right stuff.

What’s the reason behind where they host and having issues with providers? I haven’t heard this before Regarding DMCA’s, as an entity doing business where they’re legal, what should they do as a middle man?

> Regarding DMCA’s, as an entity doing business where they’re legal, what should they do as a middle man?

Don't use them and instead have your middleman be in a country that ignores intellectual property rights and copyright?

I'm not saying CF is wrong to pass them through. I'm just saying CF is not the right choice for a warez site for longevity.

Re: MangaDex infrastructure overview

#18
post #2

>more than 10 million unique monthly visitors >our ~$1500/month budget I understand not wanting to show ads, but is there no way for the users to contribute to hosting costs?

From a quick glance it seems to host obviously copyrighted content for free. In some jurisdictions (like Spain) the companies would have a hard time at court against the website creators, since it's a not-for-profit* website sharing culture.

Now show an ad, or premium accounts, and it becomes a for-profit endeavour which is straight jail time. I'm unsure about donations.

(Based on previous rulings I followed ~10 years ago, laws might have changed IANAL yada yada)

*not for profit != non-profit

Re: MangaDex infrastructure overview

#19
I've done things at scale (5-10K req/s) on a budget ($1000 USD) and I've done things at much smaller scales that required a much larger budget.

_How_ you hit scale on a budget is one part of the equation. The other part is: what you're doing.

Off the top of my head, the "how" will often involve the following (just to list a few):

1 - Baremetal

2 - Cache

3 - Denormalize

4 - Append-only

5 - Shard

6 - Performance focused clients/api

7 - Async / background everything

These strategies work _really_ well for catalog-type systems: amazon.com, wiki, shopify, spotify, stackoverflow. The list is virtually endless.

But it doesn't take much more complexity for it to become more difficult/expensive.

Twitter's a good example. Forget twitter-scale, just imagine you've outgrown what 1 single DB server can do, how do you scale? You can't shard on the `author_id` because the hot path isn't "get all my tweets", the hot path is "get all the tweets of the people I follow". If you shard on `author_id`, you now need to visit N shards. To optimize the hot path, you need to duplicate tweets into each "recipient" shard so that you can do: "select tweet from tweets where recipient_id = $1 order by created desc limit 50". But this duplication is never going to be cheap (to compute or store).

(At twitter's scale, even though it's a simple graph, you have the case of people with millions of followers which probably need special handling. I assume this involves a server-side merge of "tweets from normal people" & RAM["tweets from the popular people"].)

Re: MangaDex infrastructure overview

#20
post #6

I'm amazed that their architecture doesn't include a CDN. These days I expect nearly all high traffic websites to make use of a CDN for all kinds of content, even content that's not cached. They cited Cloudflare not being used due to privacy concerns. It'd be interesting to hear more about that, as well as why other CDNs weren't worth evaluating too.

Properly tuned NGINX on a physical server can handle incomparably large load for static content than some of the "cloud" storages around.

The "trick" has really been known for a decade, or more. Have as many things static as possible, and only use backend logic for the barest minimum.

Post reply on HN