A Mana-based RateLimiter

What is a Rate Limiter?

Trần Thiện Khiêm

--

Rate Limiting is used to control the rate of action done in a system. It can be used to prevent DoS attack or web scraping.

What is Mana?

Magic or mana is an attribute assigned to characters within a role-playing or video game that indicates their power to use special magical abilities or “spells”. (wiki)

How They are related?

Look at this following example. Phantom Assassin has 255 mana, Stifling Dagger costs 30 mana, ignoring cool down…

--

--

Trần Thiện Khiêm

Software Engineer at Facebook — a coder, a dreamer and a Dota 2 Herald.