Live data from Hacker News

Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

techcrunch.com

41–50 of 53 posts

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#41
post #10

Earlier quoted context omitted.

Is it all written in ColdFusion or something? http://gigaom.com/2010/06/08/how-zynga-survived-farmville/ Zynga uses Apache PHP on the front end, memcached for active user play and MySQL on the back end. It uses memcached to store key value pairs to deal with active user play during sessions and then later writes it to disk.

I'm obviously asking the wrong person, but if they use memcached as a temporary datastore until another process can come along later and write the data to disk, what do they do if a memcache node fails? Or would a node fail rare enough for the data loss to not matter much?

I imagine they have other memcached nodes for failover. Have no idea how it's all managed though.

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#42
post #32
post #29

Earlier quoted context omitted.

Umm... With EC2, which is what they often use, powering up and configuring 1000 machines can take 10 minutes or so, give or take a ramped boot. :-)

It makes you wonder how many servers Amazon adds per week..

That's a question I'd like the answer to. A normal customer is limited to 20 on-demand or reserved instances per region. Could anyone request to have that limit raised to 1000 per week?

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#44
post #21

Earlier quoted context omitted.

7000 users/server is actually pretty high for an MMO, though I don't know how Zynga's MMOs compare to something like World of Warcraft in terms of server resources needed. The numbers being floated around for World of Warcraft are around 75,000 cores for 10m subscribers, or about 133 subscribers per core. Obviously those aren't single-core servers, but it's still under 1k per server. Of course this and the Zynga numb…

Just to emphasize your point in the last paragraph: comparing the game mechanics in Zynga games to those in traditional MMOs is laughable. Zynga games are more comparable to social websites than WoW.

Could you point out a WoW mechanic that is actually taxing? From what I understand, WoW AI is a height agnostic beeline and battles are heavily scripted at best. The tricky part seems to be the real-time player interaction a.k.a 3d chatroom, which has nothing to do with game mechanics (e.g., IMVU).

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#45
post #8

Here's how this adds up to me: - 215M users. - Up to 1000 servers per week. - Say, they've been doing this for 30 weeks. - So they need 1 server for every 7167 users? Is this normal for mmorpg type games? - Are 215M people playing around the clock? I'm just a little baffled by this number.

"Up to 1000 servers per week" could simply mean that, there was this one week where they added 1000 servers. I'm pretty sure it's spin. We don't know what they're adding on average each week.

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#46
post #9

You'd think this stuff could be pretty efficient if done right, defer as much as possible to the flash application. I guess security is an issue if you do to much processing the the flash, probably a lot of servers to just to serve the flash.

If the flash is not changed very often why not a CDN for the flash delivery and then have the flash poll their servers with the farming actions, ect....

I'm sure they use a CDN for delivery of the flash assets. The flash is still most likely updated several times a day.

We used to batch commands in the client and submit every 6 seconds. It was still a crazy number of writes, because basically every click is a database update. MySQL is really bad at that sort of work load, but I migrated almost everything to Redis. Really fun problems to solve!

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#47
post #30

Earlier quoted context omitted.

100'000 people playing simultaneously adds up to say about 10'000 requests per second. Farmville-like games are not exactly rocket science - most of those requests should be processed sub-50ms total cpu-actual-usage time. that's 200 requests/s per server. Which adds up to 50 servers. Let's double that to account for db load too, and we're still an order of magnitude away from 1000 servers.

So each player generates a request every 10 seconds? Sorry, but that's way off. Every time they click, at least, generates a request. And then there's the famous Zynga tracking. There's no way it averages to less than a request a second.

And you really think those 100'000 are actively clicking around all the time? There are no doubt spurts of activity where they do one, even two clicks per second (most of which should not result in backend queries... surely Zynga has already implemented some kind of queuing mechanism to send those usage data in batches, rather than one by one). Most of the time, though, the users are most likely sitting there watching their crops grow - or even have another window open so they can pretend to work.

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#48
post #26
post #24

Earlier quoted context omitted.

Downvoted for not thinking through the numbers. When Zynga launches a new game, they can get over 1M new DAILY players on that game within the first week. [1] For their games, it seems that 7% of daily players are online at any given time. [2] So within the first week of launch, you have, about 100,000 people playing, simultaneously. Let's say the client is sending 5 requests per second to the game server. And let's…

An average of 5 requests per second from a casual game's client is a sign of a poor design. Realistically you very close to 1 user action = 1 request. Now, a top tier starcraft micromanager may average pull 300 actions per (ed: minute), but an average user should be somewhere around 1 action per second to 6 actions a minute. PS: The key to pulling this off is running the same simulation on the client using the same r…

You're right. I had the Starcraft 300 action/minute metric in my head, and I've definitely seen Farmville players at that level, but the average is probably much closer to 60 actions/minute.

My original point was less about the actual numbers, and more about the exercise of estimating server load, instead of just blindly declaring that they must have crappy code.

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#49
post #31

Anyone else think this is a sad use of both human and computing resources? Technically interesting, yes, but all of that for playing freaking farmville ?

Farmville is a perfect example of the self-actualization tier of Maslow's Hierarchy of Needs. [1]

The people playing Farmville are enjoying themselves and expressing themselves. Would it be better if they deployed that cognitive surplus and attention towards Wikipedia or a similar project? Of course.

But it doesn't make me sad that there are 215 million people in the world who have a comfortable enough life that they can afford to dabble in some casual games. In fact, I hope that in 100 years we can have all 7+ billion humans striving for self-actualization instead of food and water.

[1] http://en.wikipedia.org/wiki/Maslows_hierarchy_of_needs

Re: Zynga Moves 1 Petabyte Of Data Daily; Adds 1,000 Servers A Week

#50
post #21

Earlier quoted context omitted.

Just to emphasize your point in the last paragraph: comparing the game mechanics in Zynga games to those in traditional MMOs is laughable. Zynga games are more comparable to social websites than WoW.

Could you point out a WoW mechanic that is actually taxing? From what I understand, WoW AI is a height agnostic beeline and battles are heavily scripted at best. The tricky part seems to be the real-time player interaction a.k.a 3d chatroom, which has nothing to do with game mechanics (e.g., IMVU).

The easiest mechanic to point out is movement, and the synchronization of movement. At every step in the game, I'm moving along what would traditionally be game tiles, in a given orientation at a given velocity. While the 'world' is rendered around me on my PC, the movement and orientation changes all have to be upstreamed to the server and calculated for normalcy (to detect speed hacks, cheats, mountain climbing, etc).
Post reply on HN