[HN Gopher] Chess is booming and our servers are struggling
___________________________________________________________________
Chess is booming and our servers are struggling
Author : dsr12
Score : 103 points
Date : 2023-01-23 18:31 UTC (4 hours ago)
(HTM) web link (www.chess.com)
(TXT) w3m dump (www.chess.com)
| teddyh wrote:
| Everybody wants to play against Mittens?
| jacobsenscott wrote:
| I don't really get the whole mittens thing. Chess engines have
| been better than humans for a long time, and they've been on
| chess.com forever. I guess the joke of giving it rating of 1
| when it is playing at a very high level and a cute picture is
| good marketing. But getting beaten by an engine isn't
| particularly fun. It isn't really educational either when it is
| so much better than you.
| layer8 wrote:
| TIL: https://esports.gg/news/gaming/what-is-mittens-chess-cat-
| bot...
| quadcore wrote:
| Dont forget tiktok, ive seen a tutorial that changed so much my
| beginner view of the game it gave me the urge to play some games.
| It says ultimately what you have to do during a game is, you want
| to have some positive difference on pawns and then you exchange
| your pieces then promote then win. How cool is that?
| wongarsu wrote:
| > All of this generates data that needs to be written to our
| databases. Sometimes our systems max out, and just as when
| someone exercises too hard and has to stop and catch their
| breath, our servers also become exhausted and need to recover.
| When that happens, they quit working, and our site and apps
| become unresponsive
|
| Is this a tortured analogy, or are their servers actually
| crashing under load?
| traverseda wrote:
| Presumably they're referring to some kind of periodic database
| maintenance:
| https://www.postgresql.org/docs/current/maintenance.html
|
| Alternatively they might be doing something weird involving
| periodically flushing the database from memory and onto disc.
|
| That wouldn't mean "crashing", but likely would mean the
| database wasn't usable as a database.
| Kranar wrote:
| I don't think they're saying it crashes. They're suggesting
| that they have buffers of data that fill up during periods of
| high load, and when those buffers get full they have to drop
| any new incoming requests until the buffers get flushed to the
| database. During that period of time the site becomes
| unresponsive.
| adam_arthur wrote:
| Chess has to be one of the easier games to scale up, no?
| schwoll wrote:
| PVP probably yes. PvE? Not really. The algorithms for a
| competent engine are fairly CPU heavy.
| dtx1 wrote:
| and can trivially run client side
| fbdab103 wrote:
| A complete chess game should be a very limited amount of data.
| I am finding conflicting reports that a typical chess game is
| 40 to 70 moves.
|
| That being said, if any service suddenly saw a doubling of
| users within a month, plenty of sub-optimal architecture
| decisions can suddenly fall on their face which were otherwise
| adequate at the previous scale.
| Waterluvian wrote:
| Good question.
|
| A web chess game is turn based with some basic logic to sync
| the clock. There are no secrets or complex state like many
| video games. Seems rather straightforward.
|
| The hard part is scaling up everything around it:
|
| - Stockfish real-time predictions
|
| - anti-cheat monitoring
|
| - the moderation tasks any social website needs
| noxvilleza wrote:
| Anti-cheat monitoring can happen after the fact though, and
| Stockfish can run in-browser (there's a JS-compiled version
| of it).
| Waterluvian wrote:
| Oh cool. Does it run in the browser for This website? That
| would scale far better.
| bob1029 wrote:
| Replace chess with checkers and I think they'd still have ~90%
| of the same problems. This seems to be more about massive
| table/data growth than inherent complexity of the core
| business.
| scrapcode wrote:
| I've re-visited the game multiple times but really have trouble
| engaging with the game. I've tried to read a couple of tutorials
| here and there on some simple strategies, but it doesn't seem
| like anything "sticks," and I always feel so clueless after the
| first few moves as to what I should do.
|
| Any suggestions from the HN crowd on what may have provided you
| an "ah ha!" moment for chess strategy in general?
| primitivesuave wrote:
| I highly recommend Mato's chess videos on famous games
| (https://www.youtube.com/@MatoJelic), since he keeps them short
| (3-5 minutes), doesn't talk excessively about every single
| move, and only shows the interesting variations at critical
| positions of the game.
| salamo wrote:
| Sure, I'm not a pro but I've played for a bit so maybe this
| will help.
|
| 1. Choose a chess opening and stick to it. That means you'll
| always know how to react at the beginning of the game. 2.
| Counting. If your piece has more defenders than attackers, it's
| safe. If you're attacking your opponent's piece more times than
| it's defended, you can control that square. One of the biggest
| issues I had when starting out was literally just miscounting
| attackers and defenders. 3. Basic tactics. There are three
| fundamental tactics in chess: pins, forks, and skewers.
|
| Other than that, watching chess Youtubers is pretty helpful.
| Some good examples are Aman Hambleton's beginner videos[1], and
| Daniel Naroditsky's "speedruns"[2]. The latter can be slightly
| more advanced but still very understandable imo. There are
| other good channels like Hikaru Nakamura's, Gotham Chess,
| chessbrah, and Eric Rosen but I think the two I suggested are
| the best.
|
| [1] https://www.youtube.com/watch?v=axRvksIZpGc [2]
| https://www.youtube.com/watch?v=sfjI4jEY58s&list=PLT1F2nOxLH...
| dunefox wrote:
| > "ah ha!" moment for chess
|
| Replacing chess with go. :P
| oldstrangers wrote:
| If you're not motivated to play the game then there's no reason
| to continue trying to play it really.
|
| If you're not motivated because it's confusing and unrewarding
| to fail, then persistence and practice is really the only
| solution.
| spacemadness wrote:
| What worked for me was the old Chessmaster tutorials done by
| Josh Waitzkin. It gives you structured practice problems around
| general principles and strategies. It was kind of addicting the
| way they structured it and made me want to keep going. What I
| got out of it were the general fundamentals that allow you to
| perform an opening without using pure memorization, and how to
| look for tactical advantages in mid game like forks and
| skewers. Once I finished it I started easily seeing all the
| opening mistakes other beginners made and won a bunch of games
| just following the general principles. I've tried some other
| similar tutorials since but it is still the best I've used as
| an interactive tutorial.
| gardenhedge wrote:
| I am one of the people now playing chess every day but I don't
| think it's down to all those reasons listed. In my case, I am
| using it as a replacement for social media. Previously I'd pick
| up my phone and go straight to Instagram or some other app. I
| realised that my time was just wasted scrolling through pictures
| and videos that has absolutely no value.
|
| Chess is something I can open on my app and I can play on the bus
| or before bed. While it's not the most value adding thing in my
| life I am enjoying it for now.
|
| By the way, I suck at chess. I struggle to beat 900 rated
| players. Any tips?
| patrickthebold wrote:
| I wonder if they upgraded to Scala 3.
| pkolaczk wrote:
| Do they even use Scala? I thought they were using Java (but I
| may have outdated knowledge). Lichess is written in Scala. Do
| you have any pointer to an article describing chess.com tech
| stack?
| rjbwork wrote:
| It was a pithy comment on Lichess's recent post on upgrading
| to Scala 3.
| czx4f4bd wrote:
| The listings on https://www.chess.com/jobs provide some
| hints. Some mentions of PHP and Java for the backend,
| Kubernetes, Kafka, Redis, MySQL, Mongo, AWS, and GCP, among
| other things.
| transfire wrote:
| Well there's the bottleneck in a nut shell. Ditch the PHP.
| At least consider Play if you can't ditch the Java (I can't
| vouch for it, but theoretically it should help.)
|
| Otherwise they should consider Elixir/Phoenix as it is
| easily distributable and/or Rust if they need breakneck
| speed per thread.
| jacobsenscott wrote:
| Did someone say resume driven development?
| Keyframe wrote:
| So, Web-scale tech? </snark> I bet load is more on the
| everything but the chess engine itself.
| cosentiyes wrote:
| I haven't seen anything on chess.com's stack before. For gp,
| previous hn discussion on lichess and scala 3:
| https://news.ycombinator.com/item?id=33865932
| auggierose wrote:
| No, they don't use Scala.
| enterthematrix wrote:
| Lichess is both free and much better... so there's always that.
| conor_f wrote:
| I find it funny that a large business is struggling where an open
| source product with an incredibly lean team is coping with no
| issues
| kken wrote:
| For some reason, my perception is that random player selection on
| lichess leads to much stronger opponents than on chess.com in the
| lower ranks. Probably this is due to the more informed player
| base on lichess and a large influex of causals on chess.com
|
| The problem is that this only fuels the cycle. Casual players are
| scared away from lichess, possibly extending the rift between
| both sites...
| Waterluvian wrote:
| Chess found its way into my YouTube feed and that got me back
| into it. I wonder if this is just some bizarre case of the
| outcome of some thing like that.
|
| "Oops we accidentally put chess in front of everyone for a week
| and now they're all playing it."
| hannob wrote:
| Me too. I read a couple of articles about the Niemann/Carlssen
| debate, then I saw a guy talking about chess on youtube, and
| eventually I created a chess.com account.
| bgirard wrote:
| I found that as well. The cheating controversy seemed to have
| kicked off some interest and then chess started appearing in my
| YouTube and TikTok feed have started recommending interesting
| creators. For the first time I've been passively watching
| content learning chess more formally.
|
| One interesting event can kick off feed recommendations and
| start this fly wheel effect.
| colechristensen wrote:
| The Queens Gambit Netflix show a while back also kicked off a
| lot of interest.
| slm_HN wrote:
| Chess.com has the somewhat unique property of being a chess
| server run by people who aren't good at chess and aren't good at
| technology. I think they used to hire devs off Fiverr.
|
| However they are somewhat good at business as they've convinced
| thousands of people to pay $17.00 per month for something that
| can be found for free at Lichess.org.
|
| They do pay a ton of money to streamers to use their site
| exclusively, which is good for chess since it allows more chess
| players to make a living.
| Euphorbium wrote:
| For just playing they may be equivalent, but for learning and
| analysing chess.com is way better.
| nicky0 wrote:
| "run by people who aren't good at Chess" - what an odd
| statement to make.
| recov wrote:
| Especially since the main spokesperson for the website is an
| IM
| oldstrangers wrote:
| >run by people who aren't good at chess
|
| To be fair, Danny Rensch is a 2402 FIDE rated player. That's
| better than 99.9% of people on the planet.
| nchie wrote:
| "People" on the planet? If that's accurate it's not super
| impressive, considering that probably 95-99% (or more) of
| people don't take chess very seriously. I used to be the top
| 99-99.5% of Counter-Strike players (_very_ roughly
| obviously), and that wasn't very impressive at all even
| though it's way past top 99.9% of "people on the planet".
|
| (that being said,
| pc86 wrote:
| Ok just to be clear you're saying a 2400 rating isn't
| impressive? I'm not sure this is a hill worth dying on for
| the sake of useless pedantry.
| oldstrangers wrote:
| You can find whatever semantic qualifier makes it
| impressive enough for you, but a 2400 FIDE rating is
| extremely impressive and difficult to achieve.
| JauntTrooper wrote:
| I'll admit it, I subscribe to chess.com. I pay $31 / year.
|
| I mainly joined for the unlimited post-game analysis and
| puzzles. I also like the app, it's fast and intuitive. Lichess
| is great too, nothing against them.
| marshmallowmad wrote:
| I prefer their analysis over lichess's and I think they are a
| lot more feature rich. Also, I think the company in general is
| pretty good at chess? I'm an 1800 elo player for reference.
| 1270018080 wrote:
| I did not realize lichess was so much better. I just switched.
| The UI was a little off putting for some reason when I first
| started getting into chess.
| ecf wrote:
| Chess.com strikes me as a domain squatter who decided to try to
| make something of their site instead of selling it off once it
| was popular. Kudos to them, but at the end of the day they're
| still domain squatters.
| lolinder wrote:
| They bought the domain in 2005, probably for quite a lot of
| money.
| certifiedloud wrote:
| Lichess is better in every way except one: their push
| notifications are unreliable.
| tester457 wrote:
| Bad at the game, bad at engineering, but good at marketing.
|
| There's a lesson in here.
|
| Similar to how most of the software that runs the internet is
| poorly written and has bad fundamentals.
| rr888 wrote:
| Surely the most important fundamental is that it makes money?
| rco8786 wrote:
| The domain name doesn't hurt either. Though I guess you can
| wrap that up under Marketing.
| pictur wrote:
| this is a sad fact of life. a great project in terms of
| engineering can be beaten by a job that is just a wordpress
| page but great in terms of marketing.
| dan-robertson wrote:
| Is the lesson Berkson's fallacy?
| janalsncm wrote:
| Thank you for mentioning this, it's a very interesting
| thought actually.
|
| For the uninitiated, the idea is that a product needs good
| engineering + good marketing to be successful. Products
| with only one of them will fail. The idea of Berkson's
| fallacy is that even though it seems that good marketing is
| negatively correlated with engineering (and vice-versa)
| it's actually because the baseline level of engineering and
| marketing is low, and products which happen to excel in one
| don't need to excel in the other.
| randmeerkat wrote:
| > Bad at the game, bad at engineering, but good at marketing.
| There's a lesson in here. Similar to how most of the software
| that runs the internet is poorly written and has bad
| fundamentals.
|
| Maybe now we can get rid of Byzantine tech interview
| processes and instead just focus on hiring people that are
| capable of hacking things together.
| fbdab103 wrote:
| >..focus on hiring people that are capable of hacking
| things together.
|
| Based on my daily frustrations with basically every piece
| of software, that already appears to be the status quo.
| randmeerkat wrote:
| > Based on my daily frustrations with basically every
| piece of software, that already appears to be the status
| quo.
|
| That's the kind of elitist thinking that leads to
| Byzantine tech interviews and poor collaboration.
| SideQuark wrote:
| Black and white thinking that leads people to decry
| "elitist thinking" is exactly a signal of a person I
| never want to work with, because such un-nuanced
| understanding of tradeoffs required to work on
| professional projects is demonstrably beyond their
| current understanding of things that do exist for good
| reason.
|
| "Hacked together" is the software equivalent of fixing
| things with duct tape. It sounds cool and fun, and is fun
| to do for your own playthings, but it is a terrible
| mentality for developing solid projects.
| fbdab103 wrote:
| That was more a commentary on hate-the-game not the
| playa. Lots of smart and talented people in the field,
| yet software coming out the door routinely has egregious
| usability and performance defects. Bizarre prioritization
| of features that are dictated by anything other than end-
| user needs.
|
| Edit: remove the dig at management which is too easy a
| scapegoat to explain all ills
| nwienert wrote:
| The game reviews are really nice to quickly see the key
| points of the game. Plus the UI all over is better than
| Lichess. That and network effects explain the rest.
| owlglass wrote:
| I'm curious, as someone who appreciates the simple and
| intuitive Lichess UI, what makes the Chess.com UI better
| than Lichess'?
| filoleg wrote:
| Yeah, I am with you on this. It isn't even the case that
| Lichess UI is simple because it lacks advanced features,
| it just straight up feels more intuitive and way more
| pleasant to interact with. Chess.com UI reminds me of
| overcluttered websites from late 2000s/early 2010s.
|
| Pure anecdata, but I only know one person irl who prefers
| chess.com, and I never managed to get a straight answer
| from him as to why, other than "i just play there and
| like it more, maybe i will check out Lichess at some
| point, idk."
| nwienert wrote:
| Could easily go into a very long list of reasons as a
| long-time app/UX developer, but playing against the
| computer is a good starting point: on Chess.com as a
| beginner I was immediately able to play against a wide
| variety of AI's, each is given to you by their ELO
| strength, and they are tuned to have different
| personalities so you can practice against the different
| types. This is so much better than Lichess where you
| literally choose "Strength" 1-8 (no idea what that means)
| and it only then clarifies "Stockfish 14 Level 8"... ok?
| And after the game, analysis and review interfaces have
| so many more helpful things for understanding the game,
| seeing threats, etc. Maybe if I was already very
| experienced with Chess I'd not mind so much. But this is
| just one example of many I found as I tested both a
| couple months ago when I was starting.
|
| On Lichess the puzzles are less well organized and
| explained, the Lessons interface is arcane and much less
| polished in terms of content overall though there are
| gems if you hunt and eventually figure out the UI, and
| online play is likewise has a lot of small things all
| over that make a big difference.
| alexpotato wrote:
| Reading the above (which is excellent) reminded me of
| reading a review of a Linux distro window manager setup
| vs MacOs.
| Y_Y wrote:
| Worryingly, I disagree with your opinions despite your
| credentials. There's no accounting for taste, but then of
| course, all the carefully designed interfaces I don't
| like were made by people who thought they were great.
| TylerE wrote:
| For one, I vastly prefer how pre moves work on chess.com
| tarentel wrote:
| Some of the UI is really tiny on the smart phone version
| of the lichess app is my only complaint against their UI
| vs chess.com. As far as I'm concerned though they both
| could use a good designer. Neither of them are very good.
|
| Besides that I tend to use, and pay for, chess.com more
| for their other features than for anything directly UI
| related. Their puzzles are better. I think their post
| game analysis is nicer to use, the way they do analysis
| in general is easier to use than lichess I think. They
| also have a lot of learning material.
|
| As far as playing games go, I have friends who use both
| and therefor I play on both. It's about the same as far
| as I'm concerned.
| sn9 wrote:
| Is it being good at marketing or just having the obvious URL?
|
| Or is that the same thing here?
| eatsyourtacos wrote:
| >but good at marketing
|
| I don't know much about all of this but it seems to me that
| owning chess.com is 99% of their success if it's not great at
| the game or great at the engineering aspect.
| wslh wrote:
| > Similar to how most of the software that runs the internet
| is poorly written and has bad fundamentals.
|
| Microsoft Teams? Good lesson to startups and companies in
| general.
| Kukumber wrote:
| That's hard to believe, they make a shit ton of money
|
| Glad i am using and supporting lichess instead
| schiffern wrote:
| The page gave me a server error (appropriate, I suppose).
|
| https://archive.is/Sbhnk
| kaushikc wrote:
| Lichess is free to use but they do post their expenses and they
| would appreciate support from the chess playing community.
| gronky_ wrote:
| > We made a lot of investments in hardware...
|
| Sounds bizarre until you remember that over 80% of servers are
| still on prem
| conor_f wrote:
| Wow really? Have you got an article or something indicating
| that? Seems absurd to me that all cloud providers account for
| less than 20% of servers, either by traffic or sheer volume.
| SanchoPanda wrote:
| Doubled since December, and held there? Unreal.
| jsnell wrote:
| The Google Trends graphs support it:
|
| https://trends.google.com/trends/explore?date=today%205-y&q=...
|
| https://trends.google.com/trends/explore?date=today%205-y&q=...
|
| None of their explanations sounds at all plausible though.
| jollyllama wrote:
| Probably laid-off devs playing chess all day
| wongarsu wrote:
| Individually the reasons given sound weak, but they make some
| sense if you see it as some self-reinforcing trend: the 2020
| chess spike fueled by Corona and Queen's Gambit has put chess
| back into public consciousness and caused content creators to
| produce more chess content. That set the scene for the next
| wave, which was catalyzed by the cheating scandal bringing
| chess into mainstream media for a couple weeks, and creating
| narratives for people to follow. This has lead to chess
| related gifts and chess related social media posts, which
| reinforces the chess trend. Events like chess boxing probably
| helped, but are mostly a symptom of chess being more
| mainstream right now.
| lazyvar wrote:
| Some previous discussion around scaling their database:
| https://news.ycombinator.com/item?id=25730778
| TurkishPoptart wrote:
| Lichess.org does everything Chess.com does but more, without
| needing to pay.
| urbandw311er wrote:
| I don't mind paying for something particularly if it means the
| people who run it can make a living from it --- and hopefully
| ensure it's still around in 10 years time.
| rom-antics wrote:
| Same here, that's why I pay for Lichess!
| https://lichess.org/patron
| gardenhedge wrote:
| I've used both and would rather be a free user of Chess.com
| than Lichess.org.
| linkdd wrote:
| Lichess has less chess variants, less learning content (made by
| IMs and GMs), and has some gameplay differences:
| - on chess.com you can premove multiple times, each premove
| consume 0.1s on the clock - on lichess, you can premove
| only one time, but it does not consume time on the clock
|
| Also the player pool being different, the rankings are not
| equivalent, and chess.com's player pool is bigger.
|
| Also, from personal experience (so this is only anecdotal), the
| most toxic players (insulting in the chat, or ragequitting,
| ...) I met were on lichess.
|
| Comments of the form "X is better than Y" are subjective and do
| not add any value/information to the discussion.
| _Algernon_ wrote:
| Where can I get my soul crushed by Mittens on Lichess?
| pythonlover2153 wrote:
| Play a game against Stockfish level 8
| cosentiyes wrote:
| lichess.org >>> chess.com. I encourage everyone who can afford
| to donate to do so!
| sebastiansm wrote:
| Feature wise I agree with you, lichess is amazing. Chess.com
| funds a lot of tounaments that make the chess scene a lot
| more fun and interesting, lichess cant't do that.
| cosentiyes wrote:
| they could if everyone donates!
| [deleted]
| calderknight wrote:
| And it respects your freedom
| jacobsenscott wrote:
| They should have no trouble hiring some top notch engineers with
| experience with high traffic sites right now.
| alexpotato wrote:
| > What does that mean? 250,000+ new accounts are being created
| each day. People are playing games (16,000 chess moves per second
| on average)
|
| I remember reading how Dropbox and other file sharing sites used
| hashing to create single instances of popular files and then just
| used pointers from accounts with that file to save disk space.
|
| I would imagine a LOT of chess games probably start out the same
| and you can therefore store a pointer to where the game is on a
| subset of potential game starts and then write the difference as
| you branch out.
|
| I may be underestimating the possible start conditions and/or the
| metadata storage cost (e.g. time in the game of each move doesn't
| go away).
| playingalong wrote:
| I don't play chess, but my finger in the air estimate is that
| the whole record of the game weighs a few kb at most. I'd
| venture a guess that all players data and their avatars take
| more space. Or maybe less, but not much.
| nappy-doo wrote:
| Think of it this way. Every move is from 1 position on a 64
| location board to another (therefore most moves could be
| stored in about 12 total bits). There might be a couple more
| bits to represent enpassant and promotion, and my simple
| representation could easily be compressed, but for a regular
| game (generally less than 100 moves), you can store it < 1kb.
| (You still need the names of the participants, and maybe some
| other metadata, but my point is that the game compresses
| easily without too much thinking at all.)
|
| The game gets even more compact in that not all source and
| destination squares are possible at every move, etc. But,
| you're dead on in your estimate.
| noir_lord wrote:
| Depends, if it's pgn that's just plaintext.
|
| SCID uses 1 byte per move which is close to optimal (it
| splits it into 2^4 for piece and 2^4 for direction, with some
| edge cases).
|
| SCID vs PC is a fantastic tool for chess players, I maintain
| a massive database of master games using it.
| codesnik wrote:
| you probably can encode a whole board in a small-ish string,
| something you can put in a url hash. But chess game is also a
| history of moves.
| darkr wrote:
| Pretty sure you could fit it in a 64 bit int/bitmap.
|
| Potentially some SIMD optimisations could be done in this
| direction
| moomoo11 wrote:
| I have played chess maybe 5 times in my life.. so I have no
| idea but..
|
| Maybe you could store all the moves in an array of 2 byte
| ints. I doubt you can have more than 32k moves in a chess
| game.
|
| Assume 10kb per game in memory. You can run 1 million games
| on 10gb.
|
| Store the moves in the end, run your analysis, etc.
|
| Or am I missing something?
| lukev wrote:
| I was going to post that I suspected this was due to some sort of
| automated or bot activity... a couple months seems like way too
| short a time for that much organic growth.
|
| However, Google Trends also indicates a doubling of interest in
| chess as a search term over the past three months. Interesting!
| chaosbutters314 wrote:
| likely due to queens gambit (netflix show) and shotgun king
| having some influence for both being viral hits
| lukev wrote:
| Yes, the article covers those (some of them don't fall into
| the time period under discussion.)
|
| There's a few possible drivers that are no doubt helping but
| it does appear that between one thing and another, chess
| itself is going viral.
| lofatdairy wrote:
| Don't forget the cheating scandal and Carlsen declining to
| defend the WC title. Both made it into the mainstream news
| which at the very least caused people to search for chess.
| Benobba wrote:
| Move to the cloud. Problem solved.
| tzuip wrote:
| It is worth remembering that by playing you give chess.com
| possibly thousands of games, each of which can be used against
| you at any time in the future.
|
| Just if their cheating algorithm says so and they feel like
| making it public.
___________________________________________________________________
(page generated 2023-01-23 23:02 UTC)