Having not played in years and like everyone else I guess I went to chess.com after watching the Queen's Gambit, which they mention was an even bigger peak than lockdown, and I was impressed by the site: you can play immediately without registering and the user interface is nice and intuitive.
https://lichess.org/ is also very good. You can play without registering, all features are available to everyone for free, and the site is open source. It's a good clean website without ads or tracking.
(I used to be bitter about chess.com, thinking they're just cashing in on their domain name and charging for features because they can. And that may be, I don't know. But I have seen them organize some good chess events, so they might not be all bad. I think they pay streamers to use their site though, a practice I'm not too happy about.)
I’m quite happy that they are able to make money off of a game like chess. I don’t see a problem with “cashing in on their domain name.” They provide value to people, and people are willing to pay.
You generally have to pay to be a member of a chess club for example. For a fraction of the price, you can play with anyone in the world. Seems valuable to me.
Paying people to play chess can't be a bad thing. I prefer chess.com to lichess specifically because I support chess players by using chess.com. Streamers, tournaments, article writers...
I bit the bullet and got a subscription. The game analysis feature is really good (I guess you can just run that client-side in theory? I don't know), and the lesson content feels worth it for me. And stuff like 4-player chess is fun.
Chess24 has Jan Gustafsson and Peter Svidler as commentators. Amazingly good English banter from a German and Russian. In general, the individual personalities of Nations comes through really well in chess commentary, since commentators are from all over the place, are quite sharp, and everyone is talking about the same thing in usually the same language (English). I didn’t even know Germans and Russians had a sense of humor...
ICC is an old (in Internet terms) established website.
I wish more sites would let you begin using the service before trying to hoover up user accounts. I understand why it's not always possible, but it sure is nice.
It's absolutely astounding that you can go on Twitch and see Grandmasters playing speed chess at pretty much any time of day.
I agree with other posters who've said that while Queen's Gambit may have sparked interest, it's streamers -- professional chess players or not -- who are keeping interest high.
I'm a big fan of chess, and it's awesome to see so many of my friends suddenly become interested in the game!
> One of things that has really helped our DB scale is the fact that we’ve moved a lot of sorting, merging, filtering from the DB into the code itself.
This goes against everything I have learned until now. Maybe an experienced DBA can explain when moving stuff out of the database is helpful? I mean sorting, merging and filtering is the core discipline of a RDBMS and many, many man hours went into it. How and when can a custom version be better?
If you have 1m clients making DB requests and are hitting performance constraints you could do any of:
1. Add more ram, CPU, etc to the DB host
2. Create DB read replicas for higher read volume
3. Shard the DB (reads and writes)
4. Offload logic to stateless clients, who you can easily scale horizontally
So option 4 is reasonable if you don't want to or can't do the other options.
I would need to know a little more about those 1M requests before making any of your points valid. If 1M are solely reads, you can do real-time transient offload onto Redis without calling it cache and breaking your bank.
It's very application-specific. If I'm building a message board/forum software where I'm paginating tens of thousands to millions of rows, I'm probably going to do my sorting in the DB. If I'm working with a smaller data set like a users music playlist or favorite movies, I may opt to bring that data in unsorted from the DB and do everything else in app code. Even with small result sets, databases often over-allocate memory for sorting (sort buffers are usually pre-allocated) and even though it's often tunable, a lot of concurrent sorts on small data sets can waste memory.
I can break it down quickly, here:
- Scaling web servers is much easier. Queries are (mostly, on a single host) executed one after another, so if one is slow, you suddenly have a queued of queries waiting to be executed. The goal is to execute them as quickly as possible.
- 2 separate queries, both using perfect indexes will be much faster (insanely faster on this scale) than 1 query with a join. So, we just join them in code
- Sorting is often a problem, since in MySQL only one index can be used per query.
- No foreign keys increases insert/update query speeds, and decreases server load.
- Etc, etc.
And thanks for brining this up, I've added a disclaimer that these are not to be taken for granted, and they work for us, on our scale.
I did plan a whole new article about this. With all the benchmarks we've gathered over the years.
I'd certainly be tempted to move anything I could to the client...the end user's web browser. I imagine a fair amount of the load is from activity that never generates any revenue.
Yeah, I can agree with that. You really need to know what you're doing. We have benchmarks for most of such "micro-optimizations", though now we can know how things are going to behave before we even make them, just from the experience.
Definitely not something I'd suggest on an average traffic website.
They mention the huge bump in traffic from Netflix's "The Queen's Gambit". However, it is worth seeing the Google Trend for searches for both the show and chess since they wrote the blog post. Initially there was correlation between interest in the show and the game, however, as interest in the show wained, interest in the game remains steadily high.
> it was in a fairly decent state for a database that started its life over 12 years ago. Not many unused/redundant indexes, the ones that were there were mostly good.
Ah, to work on a service whose requirements have not changed in 1500 years :P.
If anyone is interested in online chess, https://lichess.org/ is a really interesting project. It is non-for-profit, avoiding freemium upselling and instead relying on user donations
Under that perspective I'm perhaps guilty of mentioning lichess unnecessarily, but I do think the site is an interesting phenomenon (i.e. providing cutting-edge technology, at no cost to users, without advertising or tracking).
Raising awareness of alternatives is good, but yep I think it's also fair to be critical of the way that awareness is generated.
I think it’s entirely warranted, given that lichess does not have the budget to sponsor big name chess streamers. The only thing that keeps lichess going is the user base.
I think it's an interesting phenomenon and worth spreading some info about, both because of the technical aspects and the philosophy of the creator I prefer.
I do the same in person with friends, and if they ignore me, or try it and prefer chess.com then not too much harm done:).
Very enjoyable talk, thanks for sharing. Funny (amusing) to hear that lichess' competitors would pay professionals not to pay on lichess. Perhaps unsurprising in the era of influencers?
> Funny (amusing) to hear that lichess' competitors would pay professionals not to pay on lichess
That is true, nevertheless, many of the same Grandmasters still play using anonymous accounts. For obvious reasons, we should not point out which accounts these are.
This was a great solution and execution under pressure. You might consider TiDB in the future when you have some breathing room to consider a new operational model. It is MySQL compatible, open source, and can scale writes horizontally as traffic increases by just adding additional nodes. Disclaimer: I work at PingCAP, the creator of TiDB.
It's very refreshing.
(I used to be bitter about chess.com, thinking they're just cashing in on their domain name and charging for features because they can. And that may be, I don't know. But I have seen them organize some good chess events, so they might not be all bad. I think they pay streamers to use their site though, a practice I'm not too happy about.)
That was a decade ago though. Maybe they've improved
You generally have to pay to be a member of a chess club for example. For a fraction of the price, you can play with anyone in the world. Seems valuable to me.
The main homepage is a huge mess though...
It's all about SEO, chess.com is the first result on Google and DDG for "chess".
https://www.chessstrategyonline.com/play-chess-online
Chess24 has Jan Gustafsson and Peter Svidler as commentators. Amazingly good English banter from a German and Russian. In general, the individual personalities of Nations comes through really well in chess commentary, since commentators are from all over the place, are quite sharp, and everyone is talking about the same thing in usually the same language (English). I didn’t even know Germans and Russians had a sense of humor...
ICC is an old (in Internet terms) established website.
And they have a bunch of chess variants to mix things up.
All around impressive site.
I agree with other posters who've said that while Queen's Gambit may have sparked interest, it's streamers -- professional chess players or not -- who are keeping interest high.
I'm a big fan of chess, and it's awesome to see so many of my friends suddenly become interested in the game!
This goes against everything I have learned until now. Maybe an experienced DBA can explain when moving stuff out of the database is helpful? I mean sorting, merging and filtering is the core discipline of a RDBMS and many, many man hours went into it. How and when can a custom version be better?
And thanks for brining this up, I've added a disclaimer that these are not to be taken for granted, and they work for us, on our scale.
I did plan a whole new article about this. With all the benchmarks we've gathered over the years.
It doesn't matter if it sorts 1000x faster than client code, when there aren't cycles left to perform this (in theory) very performant sorting.
This might not be your actual problem, but I've seen it hit a completely oblivious dev team before :)
(It's probably cheaper/easier to scale their application servers as well.)
Deleted Comment
This normally is terrible advice. You have to be sure that you really need it. Too often I see developers do this needlessly.
Definitely not something I'd suggest on an average traffic website.
Ah, to work on a service whose requirements have not changed in 1500 years :P.
J/k (kinda), enjoyed the read thanks!
Here is a great talk by the founder
https://youtu.be/LZgyVadkgmI
And here is the open-sourced code.
https://github.com/lichess-org
Raising awareness of alternatives is good, but yep I think it's also fair to be critical of the way that awareness is generated.
I do the same in person with friends, and if they ignore me, or try it and prefer chess.com then not too much harm done:).
That is true, nevertheless, many of the same Grandmasters still play using anonymous accounts. For obvious reasons, we should not point out which accounts these are.