News for hackers. Stuff that matters.
Re:An update on recent service disruptions by speedgoose on Wednesday March 23, 2022 @05:19PM (#30783540)
It’s interesting to read that so many systems and activities are dependent on a single point of failure : the main primary MySQL node at GitHub.
Re:An update on recent service disruptions by cyberpunk on Wednesday March 23, 2022 @05:27PM (#30783625)
I mean, they have $MEGABUCKS, they could probably get 1/2 the team who maintains mariadb to come in and work for them if they wanted, and they still have a giant single db node doing writes and struggle to fail it over.

We're doomed >_<

You would think it wouldn't be THAT hard to shard something like GitHub effectively.

I mean, all user accounts/repos starting with the letter 'a' go to the 'a' cluster and so on seems not exactly science-fiction levels of technology.

Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @05:48PM (#30783905)
it's profoundly strange that github has not properly sharded yet. essentially all large social networks are or have used sharded mysql successfully, this is not rocket science

livejournal, facebook, twitter, linkedin, tumblr, pinterest all use (or formerly used) sharded mysql and most of these are at larger db size than github

i will also repeat my comment from another recent thread: i just cannot understand how 20+ former github db and infra people recently left to join a db sharding company. this makes no sense whatsoever in light of github's lack of successful sharding. wtf is going on in the tech world these days

Re:An update on recent service disruptions by drewbug01 on Wednesday March 23, 2022 @06:09PM (#30784140)
> i just cannot understand how 20+ former github db and infra people recently left to join a db sharding company. this makes no sense whatsoever in light of github's lack of successful sharding.

I believe you have the chain of causality backwards here. In fact, I think it suggests that talent that went to planet scale is perhaps not the issue.

Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @06:29PM (#30784371)
i'm not suggesting that these departures are the cause of github's issue. rather, i'm saying i don't understand why such a large group from github was hired by planetscale if they did not have experience successfully sharding or successfully leveraging vitess

this is like if you were building a high-rise condo, would you hire the architects or management company from the building that collapsed in surfside florida? sure, they know what NOT to do next time, but that doesn't mean they do know what TO do

Re:An update on recent service disruptions by samlambert on Wednesday March 23, 2022 @06:44PM (#30784536)
Hi, former GitHubber here and CEO of PlanetScale. I came to PlanetScale after seeing the incredible impact that Vitess had at GitHub. The team we have hired here successfully sharded part's of GitHub's very large platform. We continue to shard very large customers at PlanetScale.

Platform migrations take a very long time and it's very complicated especially with decade old codesbases. I will say the current team at GitHub are nothing but outstanding people and engineers with a difficult task of managing a very large deployment.

Re:An update on recent service disruptions by drewbug01 on Wednesday March 23, 2022 @06:36PM (#30784457)
I understand what you’re getting at… but why is it you presume that the employees now at planetscale are the reason GH couldn’t shard out their databases?

Like, there’s another angle here: management, yeah?

Another way of reframing it is “maybe the folks hiring at planetscale know the inside baseball about GH infrastructure”. For example: https://www.linkedin.com/in/isamlambert

Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @06:44PM (#30784532)
this is my exact point: they hired the former head of GH infrastructure - literally the person directly responsible for all this at github for years - and made him their ceo

github should have sharded years ago, every other large mysql user did so much earlier in their growth trajectory

Re:An update on recent service disruptions by drewbug01 on Wednesday March 23, 2022 @06:56PM (#30784641)
Ah, that’s a more specific point than what you seemed to have been making before.
Re:An update on recent service disruptions by samlambert on Wednesday March 23, 2022 @06:48PM (#30784571)
This is just a gross simplification of the situation. You commenting from the outside without much context. GitHub is 14 year old rails app that is very complex doing large migrations of database platforms can very difficult and take a long time.
Re:An update on recent service disruptions by infamouscow on Thursday March 24, 2022 @12:11PM (#30791878)
Blaming software/database complexity as an excuse why GitHub hasn't done so is extremely pathetic. Systems almost always gets more complex over time, not less.
Re:An update on recent service disruptions by otterley on Thursday March 24, 2022 @01:59PM (#30793353)
Until you've done it yourself successfully at GitHub's scale, I think you should withhold judgment.
Re:An update on recent service disruptions by infamouscow on Thursday March 24, 2022 @02:58PM (#30794000)
There's a lot of people on HN, including myself, that have scaled MySQL beyond what we thought was possible.

The hard part isn't solving the scaling problem, but the uncomfortable conversations with leadership about how chunks of roadmap will be drastically delayed. Inevitably, leadership makes a decision to kick the can down the road, further exacerbating the problem.

Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @02:41PM (#30793792)
why do you blindly assume the person you are replying to has not worked at scale?

hundreds of engineers have worked deeply on sharded mysql at massive scale, many of us comment on HN!

Re:An update on recent service disruptions by otterley on Thursday March 24, 2022 @03:38PM (#30794414)
My experience is that people who know how challenging big, complex changes can be know better than to trivialize their difficulty when discussing them.
Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @06:29PM (#30796197)
so i would agree when talking about comments like "i could code twitter in a weekend! why so many engineers there!"

but this is different. github is a 14 year old company, with annual revenue in the hundreds of millions USD

I literally cannot think of any other comparable size and age mysql user who has not successfully sharded long ago and avoided outages of this magnitude. and in return we get hand-wavy excuses of "complexity!!!" from their former vice president of engineering who was previously also their first DBA.

criticizing these excuses is not trivializing the complexity, it's more of a "we all did this at our respective companies, who also had a lot of complexity! why can't you? we are github users, we rely on you and are very unhappy, we want to know how this happened" and just getting excuses as an answer.

Re:An update on recent service disruptions by otterley on Thursday March 24, 2022 @06:49PM (#30796424)
> I literally cannot think of any other comparable size and age mysql user who has not successfully sharded long ago and avoided outages of this magnitude.

How about a little humility? You have no idea who else has similar problems out there. I'm sure Percona and other DB consulting companies would tell you otherwise, as would PlanetScale. (If this weren't true, they wouldn't be viable businesses.)

> github is a 14 year old company, with annual revenue in the hundreds of millions USD

You're making the classic mistake of thinking that having money means you can just wave your hand and hire whoever you want with whatever talent you need to solve your problems. The world just doesn't work that way.

As for the "hand-wavy" excuses, well, the people who know the issues don't need to disclose the dirty details in a public forum, nor are they often able to because of NDAs and other legal encumbrances. And it can be a career-limiting move to throw your colleagues under the bus.

You can choose to assume people are incompetent, or instead choose to assume that people are working as best they can under the constraints placed on them. I think it's better to assume the latter.

Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @07:45PM (#30796989)
I do in fact know who else would have had similar problems, directly from personal experience and experience of coworkers and friends. large-scale mysql community is fairly insular, lots of talent rotation between the large scale companies and between percona and pythian, everyone knows everyone else, everyone talks war stories at the conference bar and elsewhere. but thanks for making assumptions once again!

i am NOT saying that github can hand wave this away with money and hiring. you misunderstand. what i am saying is company of their business size and scale should have already handled this long ago, because that's what literally every other large comparable company has done.

there are front-page-of-HN threads about multi-hour github outages every single day this week. show me an example of another similar-size company having an equivalent meltdown please. only real equivalent is twitter during fail-whale days when they were only a few years old. they solved it early on, as should have been done.

i am not saying the entirety or even majority of github is incompetent, but i am saying there is clearly something extremely wrong and extremely unusual that led to this, and citing "complexity!" is just a pile of BS.

Re:An update on recent service disruptions by otterley on Thursday March 24, 2022 @07:52PM (#30797053)
You appear to know some people and organizations who have solved the problem. What I am saying is that, other than GitHub, you apparently don't know the multitude of other organizations that haven't solved the problem yet, and you appear to falsely believe that they do not exist. (And yet you also claim to know people from Percona and Pythian; what do they tell you they do for a living?)

As I said, a lot of the problems organizations have are not publicly disclosed, and the people who know aren't authorized to talk about it. So I'm sorry, you're not going to get the examples you seek here. Companies like to keep their weaknesses close to their chest.

> i am NOT saying that github can hand wave this away with money and hiring. you misunderstand. what i am saying is company of their business size and scale should have already handled this long ago,

If not through money and hiring, how should they have accomplished it? You propose a goal but no actionable plan. That's worth diddly squat, both in engineering and in business.

Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @10:45PM (#30798137)
i have personally been on teams that solved this problem and worked on this problem. across multiple companies. with larger DB size than github's.

if you think Percona and Pythian implement sharding solutions, you are deeply mistaken, this is not what they focus on at all. advice, sure. more on the perf and ops side. but not sharding implementation, and definitely not application side of things.

furthermore i am saying if other major companies were having this type of issue, everyone in the public would know about it! because the product/site/company would be down all the time. this isn't some thing you can hush hush. close to the chest? how do you keep daily outages close to the chest? completely absurd

there is literally no analog in the US tech world to a large 14 year old company having daily outages for a week, preceded by multiple outages per month consistently for the past year+.

i will stop replying now because it is clear we live in different realities or smth

Re:An update on recent service disruptions by throwdbaaway on Thursday March 24, 2022 @11:34PM (#30798374)
Somehow you are very confident that this github issue can be avoided by horizontal sharding? I am not so sure about that. If my hypothesis is right (see my other comment in this HN discussion), then it can be rather trivial to bring down any MySQL instance or shard, such that the end result would be similar regardless of horizontal sharding.

I would also back otterley's position that there exists many other companies with larger non-sharded MySQL instances than github's. They may or may not have better reliability than github.

Re:An update on recent service disruptions by throwusawayus on Friday March 25, 2022 @12:57AM (#30798776)
innodb global lock architecture has improved greatly since 5.1. ancient bug report from harrison is not indicative of problem here. what you think, facebook has unsolvable database cpu pileups for 12 years straight? harrison would not have been promoted to vice president if this was acceptable in his shop

"They probably outsource the lock queuing logic to their Memcached layer." you are grasping at straws. the wrong straws. go attend some facebook conf talks, meet their engineers, read some arch papers, and stop speculating this nonsense. largest db tier there does not even use memcached, hasn't for 9 years. read the TAO paper!

horizontal sharding works great for many many companies with databases several orders of magnitude larger than github, why would it not work for github?

you are also saying there may be large companies with lower reliability than github? ok name them. again, if this was the case, everyone would know! their availability at this point is like what, 1 nine?

Re:An update on recent service disruptions by throwdbaaway on Tuesday April 05, 2022 @11:52PM (#30928279)
> innodb global lock architecture has improved greatly since 5.1. ancient bug report from harrison is not indicative of problem here.

No, this performance cliff does still exist in the current mysql 8.0 branch. The Contention-Aware Transaction Scheduling added to 8.0 doesn't help the queuing problem with hot row at all. So facebook either doesn't suffer from the problem, e.g. all their writes are append-only so there is no hot row, or prevents the problem from happening, e.g. with API rate limiting built on top of something like memcached.

The improvement in innodb lock architecture mostly comes from splitting the locks into more granular levels. However, updates to the same hot row would require the same lock at the page-level. It is already as granular as it can be. So the tag of the bug report is correct, this is a problem of "lock queuing".

Re:An update on recent service disruptions by otterley on Friday March 25, 2022 @01:11AM (#30798838)
Not every organization that is either behind the 8-ball on their MySQL scalability projects or who is suffering incidents as a result is making headlines. That’s just a fact, and you’re just going to have to accept that you don’t know everything.

And frankly, given your attitude on this, I think you’re going to need to present some bona fides for anyone to take you seriously. Maybe you can even convince GitHub to hire you and solve their problems. I bet they’d be happy to listen to you berate them on how pathetic they are.

Re:An update on recent service disruptions by throwusawayus on Friday March 25, 2022 @01:28AM (#30798927)
i was not even the commenter who said they were "pathetic", sheesh now you are attributing others' comments to me!

i have posted many correct technical details in various subthreads of this post. i don't care if you believe me, i do not live in your reality where constant downtime is totally fine and major companies are down all the time but no one knows about it

Re:An update on recent service disruptions by krageon on Tuesday March 29, 2022 @07:40AM (#30841264)
There have to be thousands (if not more) people that have. Why assume that they have not?
[dead]
Re:An update on recent service disruptions by ketzo on Wednesday March 23, 2022 @06:58PM (#30784651)
This is a super, super annoying type of comment, and against HN guidelines. It adds absolutely nothing to the conversation. Don't go digging through people's comment history to throw mud.
Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @07:02PM (#30784673)
i did not dig through his comment history. i was directly participating in that thread i quoted! and it was a recent thread. please check it again.

i agree though my comment could have been nicer. apologies.

as to adding nothing to the thread: disagree. he literally dumped on AWS with false claims. how do you know i don't work at AWS? why is it ok for him to say stuff like that?

Re:An update on recent service disruptions by pubg on Wednesday March 23, 2022 @08:26PM (#30785221)
Let these types live in their supreme know-it-all fantasy world, they're not worth a thought. Anyone with a little common sense will see through their shenannigans and proceed to ignore them the way you'd ignore an ant on the sidewalk as you go about your busy day.

Don't take it personally, their ignorance has nothing to do with you.

Re:An update on recent service disruptions by shkkmo on Thursday March 24, 2022 @12:35AM (#30786408)
The issue isn't just a lack of "niceness" but also how this type of comment derails the conversation into an offtopic argument which should have been pursued only in the original context.

If you disagree with the particular assertions here (that your are grossly oversimplifing without context), you should address it directly. Saying "it's fine because you do it too" isn't so much a lack of "niceness", but rather how this type of comment unproductively derails the conversation into an offtopic argument while adding zero constructive discussion.

Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @01:07AM (#30786537)
> offtopic argument which should have been pursued only in the original context

I would have gladly had that discussion in the original context! but he did not reply to me there, nor to any of the other 6 people who replied to that horrendously incorrect comment of his

i would have let it go, but yet here he calls me out saying my own comment is grossly oversimplified, but he offered little explanation of his perspective. if i am understanding his brief argument it is:

1) github is old.

2) sharding is hard.

ok so here is my response: it was a lot less old when he started working there in 2013. many other companies have sharded several years after launch. yes it is hard. i have directly worked on teams sharding larger DB's than github's, sharding legacy apps. and so forth. it can be done.

it is really hard to justify github to be down this many times from the same root cause. year after year

Re:An update on recent service disruptions by shkkmo on Thursday March 24, 2022 @01:37AM (#30786648)
> I would have gladly had that discussion in the original context! but he did not reply to me there, nor to any of the other 6 people who replied to that horrendously incorrect comment of his

I think your response in that thread was sufficient. If you feel it was insufficient, that thread would be the correct place to continue the discussion or further clarify any misinformation where people may actually it.

People rarely admit when they are wrong and you don't have a right to (or even a reasonble expectation of) any such admission in this context. Harassing them about it in other threads is not a positive contribution to the discussion or the community.

Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @02:40AM (#30786918)
he accused me of making a gross simplification. i responded, perhaps unkindly. but at no point have i "harassed" him.

github's outages have made my life difficult. planetscale's pricing scheme has also burned me. i am not just attacking this guy at random.

based on upvote points i can conclude many people do think i am contributing positively to this discussion. please refrain from tone-policing me. i don't see any technical comments from you in this discussion whatsoever so how exactly are your comments positively contributing?

Re:An update on recent service disruptions by shkkmo on Thursday March 24, 2022 @10:21AM (#30790147)
I already explained that the issues was not your tone, but your attempt to revive an argument from a different, unrelated thread, in this one.
Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @01:12PM (#30792702)
i did so because it is directly relevant to this topic!

the person who for many years was directly responsible for github's databases, and later their overall infrastructure, recently made a horrendously inaccurate statement about the industry's most popular managed database offering

this shows either a severe lack of technical understanding, or a willingness to make deliberate technical misstatements

now github is down literally every single day due to database problems. it is very relevant! accountability is important!

Re:An update on recent service disruptions by sillysaurusx on Wednesday March 23, 2022 @05:29PM (#30783653)
> they could probably get 1/2 the team who maintains mariadb to come in and work for them if they wanted

The Mythical Man Month has a few things to say about that.

(It's tempting to feel that the information is outdated, but in my experience it still seems true.)

Re:An update on recent service disruptions by cyberpunk on Wednesday March 23, 2022 @05:31PM (#30783687)
My point was, that they've not done that, is because it wouldn't help.

This is an architectural problem, which even if they had the massive expensive brains behind something like mysql on their team they couldn't fix it.

(at least, I'm guessing, I think this kinda architecture doesn't scale even if they could kick the can down the road a few times..)

Re:An update on recent service disruptions by sillysaurusx on Wednesday March 23, 2022 @05:39PM (#30783787)
Oh, my apologies! Yes, that makes sense.
Re:An update on recent service disruptions by pcj-github on Wednesday March 23, 2022 @09:47PM (#30785640)
Lots of people commenting here about how easy it must be to shard mysql at GitHub scale...
Re:An update on recent service disruptions by otterley on Thursday March 24, 2022 @01:28AM (#30786615)
Just because you have money doesn’t mean you can hire anyone you want to. Talent is scarce, especially in highly-specialized roles, and people have free will.

I think the complexity of GitHub’s data management requirements would surprise you. Better to withhold judgment until you possess all the facts.

Re:An update on recent service disruptions by prepend on Wednesday March 23, 2022 @05:29PM (#30783665)
My fear is that this seems like a cover excuse for moving off MySQL. The bug will be too hard and they’ll move off. They will choose SQLServer and take a lot of time to convert and then have even more outages.
Re:An update on recent service disruptions by nimbius on Wednesday March 23, 2022 @05:53PM (#30783962)
100% agreed. a lift-and-shift migration to Galera and modern MariaDB wouldnt be hard, but knowing MS there are mid managers waiting in the wings to swoop in and drive this into the ground with azure/sqlserver, the former of which posted 8 outages in the past 90 days alone.

this is classic Microsoft. spend a ton of money for something very valuable -- in this case virtually all developer marketshare -- and then casually pedal it into the ground while you lie about the KPI's to C levels (IIS marketshare on netcraft as a function of parked websites at GoDaddy to dominate over Apache) and keep it on life support with other revenue streams (XBox) for the next 16 quarters until it becomes a repulsive enough carbuncle to shareholders that it gets the axe (Microsoft phone.) then in a year, limp into the barn with another product nobody else but you could afford to buy (minecraft) and slowly turn it into a KPI farm for Microsoft account metrics to drive some other failing product (Azure) and keep the C level happy while you alienate virtually every player with mechanics or requirements they hate.

Re:An update on recent service disruptions by prepend on Wednesday March 23, 2022 @06:15PM (#30784210)
It’s funny you mention Minecraft. My kids recently said “I hate Microsoft. All they did is ruin Mojang.”

They don’t know Microsoft for anything other than ruining Minecraft. They didn’t know Microsoft made the Xbox or even Windows.

They made this statement after Microsoft forced them to migrate their account they’ve had for 5 years to a Microsoft account. That broke their computer for a few days and reset their games. For no useful reason.

Re:An update on recent service disruptions by wyclif on Wednesday March 23, 2022 @11:26PM (#30786111)
My son is eleven years old, a huge Minecraft fan, and is exactly like that. Now, he does know that MSFT makes Windows, but that's not an existential threat to him like ruining Minecraft is.
Re:An update on recent service disruptions by illustrateth on Thursday March 24, 2022 @02:05PM (#30793421)
yes! i signed up for an account here just so i could say this. we got refurbished computers for my children just to play Minecraft. Minecraft didnt work in windows, so i set up a dual boot Ubuntu system (while biting my nails i might totally destroy the os), thatnwas working well for months. when they had to migrate their account, somehow it switched my daughter's local login to a Microsoft family login which screwed up her other apps (like adventure academy). im tearing my hair out trying to figure out how to switch it back to a local login. i already have two other apps for monitoring computer time (which already don't always work out as well as youd think, so i didnt want to really have to deal with a third one.) i guess ill eventually figure it out, but found this page looking for a solution. (and im not that techy right now, so it takes a good chunk of time.... sigh
Re:An update on recent service disruptions by deckard1 on Thursday March 24, 2022 @01:12AM (#30786559)
wait until Microsoft starts screwing up Blizzard IP. Or, I guess, screwing it up more than Activision-Blizzard already did...
Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @06:02PM (#30784062)
galera is not a solution for scaling out writes, full stop

galera has lower max writes/sec than a traditional async single master because it's a cluster. the other members of the cluster need to ack the writes, and all members are doing all the writes, so adding machines does not increase your max writes

Re:An update on recent service disruptions by andrew_ on Wednesday March 23, 2022 @09:26PM (#30785542)
Looking for education here: in reading my understanding of MairaDB was that it's not as well suited to large databases and heavy read/write performance in those databases, as compared with Postgres. Would the primary argument be for MariaDB's sharding support first-class?
Re:An update on recent service disruptions by drewbug01 on Wednesday March 23, 2022 @06:06PM (#30784104)
At GitHub’s scale, you don’t just “move off” a database. At best it would be a gradual project that would take years for the company to complete, and likely trigger additional incidents along the way.
Re:An update on recent service disruptions by samlambert on Wednesday March 23, 2022 @06:55PM (#30784625)
Correct.
Re:An update on recent service disruptions by protomyth on Wednesday March 23, 2022 @06:16PM (#30784225)
Why would Microsoft not migrate to SQL Server? MySQL is owned by Oracle. Microsoft cannot be happy about using a product from Oracle. SQL Server is a pretty good product and the conversion will give them even more tools and expertise for their consulting wing to do it for other companies.
Re:An update on recent service disruptions by macintux on Wednesday March 23, 2022 @08:35PM (#30785267)
They famously tried to migrate Hotmail to Windows after purchasing it, and that proved a long, excruciating process.

I doubt they have enough to prove wrt SQL Server to make it worth going through that again.

Re:An update on recent service disruptions by Ygg2 on Wednesday March 23, 2022 @06:51PM (#30784594)
They do seem to be acting like they are cool and OSS friendly.
Re:An update on recent service disruptions by protomyth on Wednesday March 23, 2022 @07:35PM (#30784938)
OSS friendly is one thing, but not using one of your flagship products is another. Plus, MySQL is Oracle and who knows where that goes.
Re:An update on recent service disruptions by prepend on Wednesday March 23, 2022 @09:43PM (#30785621)
Microsoft could easily fork and maintain mysql if oracle did anything wonky. And they could use MySQL without paying any licensing fees due to its OSS license.
Re:An update on recent service disruptions by qbasic_forever on Wednesday March 23, 2022 @07:28PM (#30784869)
Does it matter? Github is a closed source service. If they run Microsoft SQL Server vs. MySQL it doesn't matter or change anything for its users. All that us as customers and users care about is the experience and performance. Whatever they want to do internally to achieve that doesn't matter at all IMHO.
Re:An update on recent service disruptions by prepend on Wednesday March 23, 2022 @09:42PM (#30785617)
It matters because it makes their product worse. I’m a customer so I’m impacted by using a crappier database that has higher costs and worse performance.
Re:An update on recent service disruptions by baq on Thursday March 24, 2022 @01:18AM (#30786576)
SQL Server is at least as good as any variant of MySQL and that’s only if you want to be very generous for MySQL.

If you meant that and I misunderstood, the other issue is that you don’t migrate to a different RDBMS. You rewrite half of the app and then spend a couple years fixing issues.

Re:An update on recent service disruptions by stillblue on Thursday March 24, 2022 @12:43AM (#30786443)
SQL Server is crappier? How?
Re:An update on recent service disruptions by nodesocket on Wednesday March 23, 2022 @08:38PM (#30785278)
Microsoft SQL actually is pretty good and really performant (with my limited production use).

I would argue it’s more performant than vanilla MySQL and it supports multiple write masters using peer to peer transactional replication an enterprise license feature (https://docs.microsoft.com/en-us/sql/relational-databases/re...)

Re:An update on recent service disruptions by prepend on Wednesday March 23, 2022 @09:45PM (#30785632)
It’s not a horrible database, but it’s just expensive and pretty much never a better choice than Postgres or other OSS dbs.

There are certainly some very niche use cases where you need it, but there’s a reason why tech stacks don’t use sqlserver. I think there are better ways to handle durable transactions and redundancy than using sql enterprise with sql‘s replication.

Re:An update on recent service disruptions by thecosmicfrog on Wednesday March 23, 2022 @08:30PM (#30785246)
Counterpoint - with GitHub now being part of a large database and cloud vendor (i.e. SQL Server and Azure), surely there are at least some merits to moving workloads to those technologies? Leverage internal knowledge, talent, etc.
Re:An update on recent service disruptions by jiggawatts on Thursday March 24, 2022 @01:39AM (#30786657)
"talent"

Nothing I have seen about Azure SQL fills me with confidence about their technical capabilities.

Performance at all tiers is woeful, the networking connectivity is madness, and disaster recovery doesn't.

Re:An update on recent service disruptions by ankraft on Thursday March 24, 2022 @04:27AM (#30787395)
I’m curious why you think this way, can you elaborate?
Re:An update on recent service disruptions by jiggawatts on Thursday March 24, 2022 @06:20AM (#30787979)
Don't take my word for it. Spin up an Azure SQL database and try it yourself.

"Ping" it using a trivial query such as "SELECT 1" a thousand times in a row and draw a histogram. Or just eyeball the numbers. I did this recently and had response times over 12 milliseconds regularly. For comparison, a small and cheap IaaS VM running SQL Server can get down to the 150 microsecond range and stay there.

For this 100x degradation in performance you get the privilege of paying several times the cost of an IaaS VM + SQL license.

Azure SQL proxies connections. I mean sure, the documentation says that they can do a "redirect" instead of a proxy, but not if you use any of their "private" network connection options. You would think that is some sort of simple IP header change implemented by the switching gear in hardware, but you'd be wrong -- it tunnels through what is essentially a VPN -- with all of the predictable issues. These tunnel VMs don't have accelerated networking turned on, for example. So you can have "business critical" tier on one end, and huge VMs with accelerated networking on the other end, but the traffic in between is being routed through some 1 vCPU virtual router appliance processing packets in software.

Anyone with database admin rights can alter firewall rules via SQL commands. These are via SQL Server accounts and hence they're just a username and password, no MFA or anything. If you can find a SQL injection vulnerability you can punch a hole through the "firewall". Brilliant.

The firewall supports IPv4 only, and uses different CIDR syntax to everything else in Azure. It doesn't support Service tags, or logging, or monitoring, or anything really. It exists only to tick a checkbox.

Unlike most other Azure services, SQL doesn't integrate with Azure Active Directory or RBAC properly. So for example you can have one AAD group as the SQL Admin. No other rights, no list of principal IDs... just one admin group. All other delegated permissions must be done through SQL commands, blocking the use of ARM templates, Policy, custom roles, etc...

If you delete an Azure SQL Server instance, it deletes all backups associated with it. Sure, they recommend that you put a "delete lock" on the server, but then most administrative operations become impossible because you can't then delete any child objects. And even if you do create a delete lock, that can just be deleted. There is no way to say "backups cannot be deleted for at least 'x' days", even though the underlying storage accounts support this feature.

DISCLAIMER: Some of the above may have changed since I last checked, always read the documentation and/or verify with support if your data matters to you.

Re:An update on recent service disruptions by grnmamba on Thursday March 24, 2022 @09:44AM (#30789641)
> If you delete an Azure SQL Server instance, it deletes all backups associated with it.

That... is a massive footgun. Essentially a 1-click method to destroy your business.

I'll set up delete locks ASAP, thanks for the tip.

Re:An update on recent service disruptions by speedgoose on Wednesday March 23, 2022 @05:33PM (#30783712)
I bet on Azure Cosmos DB.
Re:An update on recent service disruptions by antn on Wednesday March 23, 2022 @10:02PM (#30785715)
Nope.
Re:An update on recent service disruptions by KMag on Wednesday March 23, 2022 @11:08PM (#30786022)
Somehow, I just assumed that because git is based on content-addressed storage DAG that GitHub internally heavily leveraged a distributed hash table and content-addressed storage DAG. With content-addressed storage, all of the stored data is immutable, so caching is significantly simplified, and a DHT can scale very well horizontally. Care still needs to be taken around the transactions that change DAG roots (heads of branches), but the rest is just making sure immutable blobs are sufficiently replicated in the DHT.

A DHT isn't a great fit for really rapidly changing data like metrics and such, but I figured that everything required to keep the basic git clone, commit, and web serving functionality is a pretty natural fit for a DHT.

I figured even code search had a relatively small amount of storage for indexing recent commits, with compaction of that data resulting in per-token skiplists stored into the DHT. That way, failure outside of the DHT serving path still allows code search for all commits older than the latest (incremental) compaction. Distributed refcounting or Bloom filters could be used for garbage collecting the immutable blobs in the DHT. The probability of a reference cycle in SHA-256 hashes of even quadrillions of immutable blobs is vanishingly small.

Re:An update on recent service disruptions by crdrost on Thursday March 24, 2022 @12:50AM (#30786470)
Permissioning/ACLs is something that you really want to get synchronous whenever possible, you don't want caching and pipeline delays if you can help it.

Some maintainer is acting in bad faith, someone else quickly locks them out of all the repositories that they have not yet thought to corrupt, then it looks really really bad if they find out that they still have permission to run the CI/CD scripts, maybe with malicious substitutions, even though you blocked them from being able to push commits up.

The other part of that is, it's not too hard to get right. See what GitHub was doing. People don't change ACLs that often, nowhere near as often as you read them. If they did, you could rate-limit them. And the rest of the problem is, you have one writer and many read copies in one place and you can enforce boundaries on how stale the data gets on the read copies.

Two hard problems, first is cache invalidation.

Of course, they have found out that they are big enough to shard, one would have hoped that they would have found that out in a gentler way, much sooner. But let's not pretend that their architecture makes no sense, it's a fine architecture, they just happened to outgrow it in a bad way.

Re:An update on recent service disruptions by KMag on Thursday March 24, 2022 @11:48AM (#30791557)
I think it's wise to minimize the number of synchronous reads necessary for correct operation. Pervasive usage of immutable data and (expiring) cryptographic capability tokens makes this much easier. Typically, the use of immutable data results in slower writes, but simpler caching logic, which can often result in faster reads in distributed systems. Luckily, many workloads are very read-heavy.

If your CI/CD pipeline uses capability-based permissions, utilizing delegatable expiring cryptographic tokens (e.g. Google's Macaroons), then a stale read of the ACL (presenting a token incompatible with the latest ACL) would allow the CI/CD pipeline to start running. Completing all non-local I/O (i.e. observable side-effects) would require synchronous reads of a cryptographic hash of the latest repository ACL and comparison with an ACL hash in the token (with a slow path of re-verifying the token could still be issued in case of ACL changes). Presumably, this ACL hash would be a part of the repository's immutable root node, so in the common case of CI/CD pipelines storing outputs into a repository, this synchronous read is "free" in the sense that it's part of the transaction to change the reference to the repository's immutable root node.

Granted, you have to be careful and make sure all of the I/O that's not local to the CI/CD pipeline (i.e. all observable side-effects, e.g. releases, sending emails) goes through through an ACL check that involves a synchronized read of the repository root reference. The fast path is just checking the cryptographic hash of the ACL in the capability token against the hash in the repository's root node. The slow path (when the ACL has changed since the capability token was generated) involves re-checking the ACL and verifying that the user named in the token is still allowed to create the presented token.

The downside is a racy read of the ACL (in the form of presenting a cryptographic token based on a revoked permission) when starting the CI/CD pipeline results in wasteful resource usage. If this is a worry, an additional synchronous read can be added at pipeline start time to avoid this race. If the cost of this synchronous read is prohibitive, a cache of <user, revoked_permission, revocation_time> can be added to the CI/CD start logic.

The upsides are that you can cache ACL reads client-side (in the form of your cryptographic capability tokens), needing only synchronous ACL reads for non-local I/O (i.e. observable side-effects) and if an attacker starts a malicious CI/CD operation, locking out the attacker before the malicious I/O (releases, emails, etc.) completes results in the malicious non-local I/O (i.e. observable side-effects) getting discarded.

Re:An update on recent service disruptions by wincent on Wednesday March 23, 2022 @05:33PM (#30783710)
Linked in the article is this other one, "Partitioning GitHub’s relational databases to handle scale" (https://github.blog/2021-09-27-partitioning-githubs-relation...). That describes how there isn't just one "main primary" node; there are multiple clusters, of which `mysql1` is just one (the original one — since then, many others have been partitioned off).
Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @05:51PM (#30783939)
from that article it sounds like they are mostly doing "functional partitioning" (moving tables off to other db primary/replica clusters) rather than true sharding (splitting up tables by ranges of data)

functional partitioning is a band-aid. you do it when your main cluster is exploding but you need to buy time. it ultimately is a very bad thing, because generally your whole site is depenedent on every single functional partition being up. it moves you from 1 single point of failure to N single points of failure!

Re:An update on recent service disruptions by dikei on Thursday March 24, 2022 @05:14AM (#30787629)
>> functional partitioning is a band-aid.

I disagree, functional partitioning is not a band-aid, but an architectural changes that in the end can reap much more benefit than simple data sharding.

>> your whole site is dependent on every single functional partition being up. it moves you from 1 single point of failure to N single points of failure!

Not necessarily, it can also be that only some parts of your site are dead while others work perfectly fine.

Re:An update on recent service disruptions by throwusawayus on Thursday March 24, 2022 @02:39PM (#30793763)
too idealistic. invariably some team (or usually many teams) don't properly gate some critical-path logic, they depend on some functional partition always being online and then boom much larger blast radius than intended

then they fix it in post-mortem but pattern just repeats. i have seen it so many times! used to be much worse in the earlier days of the cloud when VMs would go poof more often

Re:An update on recent service disruptions by wincent on Wednesday March 23, 2022 @05:55PM (#30783992)
Towards the end:

> In addition to vertical partitioning to move database tables, we also use horizontal partitioning (aka sharding). This allows us to split database tables across multiple clusters, enabling more sustainable growth.

Re:An update on recent service disruptions by throwusawayus on Wednesday March 23, 2022 @06:00PM (#30784047)
yes i know, the fact that this is a small blurb at the bottom of the article (which is largely about functional partitioning) exactly proves my point
Re:An update on recent service disruptions by zamalek on Wednesday March 23, 2022 @07:11PM (#30784740)
This is what happens when you handwave CAP theorem. I am shocked at the number of people who are shocked that Github couldn't easily resolve this.

Tech debt has to be paid in full, whether it's person-hours, or downtime, or both.

Re:An update on recent service disruptions by eatonphil on Wednesday March 23, 2022 @05:26PM (#30783614)
I can imagine what they're in a rush to refactor.