Documente Academic
Documente Profesional
Documente Cultură
RIOT
OURGAMES
STORY ENGINEERING
CAREERS GAMES NEWS !
Search...
Search Stories
!
Running
Online
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 1 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
CAPACITY PROBLEMS
When we first launched the API, our deployed Zuul
instances were able to handle about 10K requests
per minute (RPM) each before falling over (more
on that later). We didnt have a lot of insight into
the expected capacity, but the low RPMs we were
able to eek out was always a point of concern and
confusion given how effectively Zuul works for
Netflixs large traffic volume. Throughout the
lifetime of the API platform, we saw troubling
patterns of behavior where exceeding certain
RPMs or slow proxied requests would cause Zuul
instances to become unresponsive. When our Zuul
instances are unresponsive, API calls fail, which
affects 3rd parties that use our API. Highly
trafficked sites, like LoLKing.com and OP.GG, do
caching on their end so that when the API is down,
they can still function, albeit with stale data.
However, many sites are unable to provide certain
features or function at all if the API platform is
unresponsive. Thus, finding and fixing these types
of issues with the API platform has always been of
utmost importance.
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 2 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
SOCKET MANAGEMENT
Shortly after launching the API, we noticed a
pattern of behavior where over the course of a few
hours, Zuul would become very slow and stop
responding to calls, and would then recover on its
own. Usually after a day or so of the oscillating
pattern, the issue would resolve on its own entirely
before reappearing months later.
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 3 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 4 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
Added to /etc/sysctl.conf:
Added to /etc/security/limits.conf:
Added to /usr/share/jetty/start.ini:
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 5 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 6 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
Added to /etc/sysctl.conf:
Added to /etc/security/limits.conf:
Added to /etc/pam.d/su:
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 7 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
Added to /usr/share/jetty/etc/jetty.xml:
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 8 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 9 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
ACHIEVING STABILITY
Once Riot Direct added our IPs to their white list,
we decided to slam one of our production Zuul
instances with spectator service requests to
ensure that the issue was resolved. We knew that
the other fifteen Zuul instances would be able to
handle the load even if we took down the Zuul we
were using for the load test. We found that no
matter how much load we threw at it, it kept going
with no issues, eventually handling more RPMs
than ever before on a single box. We managed to
get all traffic to the NorCal VPC, which handles
about 150K RPM 50% of our total API load for all
regions running reliably on one 8-core instance.
Before that, NorCal traffic had been running
against sixteen 4-core boxes running with 4G of
heap space.
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 10 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 11 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
CONCLUSIONS
We estimate that the change from 30 to 12 boxes
will save us about $25,000/year. More
importantly, we have finally been able to get Zuul
to handle the sort of load that we always knew it
should be capable of handling, but never could
explain why it didnt. Netflix uses this proxy server
to handle massive amounts of traffic and
bandwidth, so there was no reason why it
shouldnt scale. Zuul was never really the issue at
all.
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 12 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 13 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 14 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
Comments Community !
1 Login
Sort by Best
Recommend 2 Share
Thanks
Reply Share
Subscribe
d Add Disqus to your site Add Disqus Add
% Privacy
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 15 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 16 of 17
The Riot Games API: Fulfilling Zuul's Destiny | Riot Games Engineering 23/11/2016, 18*52
https://engineering.riotgames.com/news/riot-games-api-fulfilling-zuuls-destiny Page 17 of 17