HNHacker News
TopNewBestAskShowJobs

ericyan

245 karma · joined October 23, 2012

submissionscomments
ericyan··on Announcing Vitess 11
That's a footgun.

For ring replication to work, it requires all replication sources (aka. "masters") to be online at all times. This never happens in real life, so it is just a matter of time that you get a nasty split-brain. Star replication tries to mitigate this by a crazy setup with replication filters that is painful to maintain and probably will break after some DDL statements.

Moreover, neither of these can handle conflicts. If a row gets updated on different hosts at the same time, you will get broken replication and/or split-brain.

To scale writes, sharding is usually the way to go and Vitess can be handy for that. By the way, MySQL group replication has multi-primary mode that is safer. Galera Cluster/PXC probably has something similar but I am not completely sure.

ericyan··on Announcing Vitess 11
Or even better, something like PlanetScale [1]. It was founded by the maintainers of Vitess.

[1]: https://www.planetscale.com/

ericyan··on Announcing Vitess 11
I heard that YouTube has migrated to Spanner already. YT was the last major user of MySQL at Google, the Googlers probably consider that as a snowflake and wanted to move away from it. Nothing wrong with Vitess itself.
ericyan··on Announcing Vitess 11
If you use Oracle MySQL or Percona Server, I would recommend to try group replication[1], no third-party software required.

MariaDB can use something similar called Galera Cluster. Percona also has its own version, called Percona XtraCluster (PXC).

For more traditional MySQL/MariaDB replication typologies, Orchestrator[2] is a great tool.

For postgres, I have heard a lot of good words about Patroni[3], although I never used it myself.

[1]: https://dev.mysql.com/doc/refman/8.0/en/group-replication.ht...

[2]: https://github.com/openark/orchestrator

[3]: https://github.com/zalando/patroni

ericyan··on External IPv6 addresses for VM instances is now in General Availability
I think Google actually should gives customers a discount if they go IPv6-only.
ericyan··on Mitchell Hashimoto takes on a new individual contributor role at HashiCorp
Stepping down from a leadership position in order to focus on engineering is something as rare as a unicorn. This person has my respect, as always.
ericyan··on Migrating Facebook to MySQL 8.0
Easy to operate, perhaps?

With MySQL group replication, it is pretty easy to set up a HA cluster that allows you to sleep soundly. It can also handle thousands of connections without the need of a connection pooler.

ericyan··on Tosh: Changing your SSH server's listen address every 30 seconds based on TOTP
This reminds of port knocking. Could be useful if you are really annoyed by those script kiddos, but in essence this is security by obscurity.
ericyan··on China bans financial, payment institutions from cryptocurrency business
https://en.wikipedia.org/wiki/Too_big_to_fail
ericyan··on Why do database columns have a character length of 191?
Hash index is only useful for exact matches, a full table scan would be required for any other kinds of queries. That is why most database engines have settled with B+ tree.

Regardless the type of index, field length still matters if you care about performance. Smaller fields and smaller indices means you can fits more things (the working set) in RAM and less I/O when you have to hit disks.

ericyan··on Out-of-control Chinese rocket expected to fall to Earth in the coming days
The term "差不多 (chabuduo)" could but is often NOT used with a shoulder shrug in day-to-day communication. The actual meaning, just like any other language, depends a lot on the context.

For questions asking for a mount of something ("How much ... would you like?"), it is common to answer that with 差不多兩匙 (about two spoons) or 差不多那樣 (that's about right). In this context it should translate to "about" or "about right".

When someone is being annoying, people in the northern part of China would often say 差不多得了, which means "that's enough, stop it".

Of course, there would be mediocre people use this phrase with a shoulder shrug. The problem is the attitude, which as you said, is not culturally specific to Chinese.

> It's an attitude very prevalent in Mainland China

Mainland China has a huge population. Even if just 10% of them having this attitude, that is still a lot of people. There is a good chance you have met some of them, as I did myself, unfortunately.

There is also bias. Cheap products, regardless where it is made, has a higher probability to fall apart after a few months. You will only hear it from the news if a building collapsed or there was a terrible incident; if everything works -- as it should -- it won't make the headlines.

There is also a term for poorly-built projects, 豆腐渣工程( https://en.wikipedia.org/wiki/Tofu-dreg_project) and people are furious when they read about it. People cut corners because they have the incentive to do so and they know they might be able to get way with it by paying a relatively small penalty to the potential gain.

It is not a "chabuduo", it is actually about taking a precisely calculated risk. The flawed system is giving the people the wrong incentive, that's what holding China back from its full potential.

> I haven't encountered this in Taiwan, Malaysia, Singapore, or even Hong Kong.

That's probably just because you haven't stayed in those place long enough. A quick search in Spotify gives you:

* 差不多姑娘 by G.E.M, a singer in Hong Kong: https://open.spotify.com/album/28sxY4WxuFLQ5wMeugtyAp

* 差不多先生 by MC HotDog, from Taiwan: https://open.spotify.com/album/7xEo9EqHb4X52fA7DGiDPg

* and so on...

ericyan··on The End of AMP
It is not just about the markup. Mozilla and Apple made it very clear they won't implement this (for good): https://www.chromestatus.com/feature/5745285984681984
ericyan··on The End of AMP
Unlike a normal CDN, AMP does not serve the same content as the origin. You need to make a special, lite edition of the original web page which does not work on Safari or Firefox, and may not necessarily make your site faster. [1]

You cannot switch AMP cache to another vendor if you want Google rank your AMP site higher. [2] You also need a speical TLS certificate with the CanSignHttpExchanges extension that can only be get from DigiCert (for a price)[3] and not from Let's Encrypt [4].

[1] https://unlikekinds.com/article/google-amp-page-speed [2] https://stackoverflow.com/a/41683427 [3] https://web.dev/how-to-set-up-signed-http-exchanges/#step-1 [4] https://community.letsencrypt.org/t/cansignhttpexchanges-ext...

ericyan··on Ask HN: Google Drive/Office 365 alternatives
The Data Protection Act 2018 enacts the EU GDPR requirements in UK law, which will become the UK GDPR after 31 December 2020. So, technically no, but in practice, yes.
ericyan··on Mozilla lays off 250 employees while it refocuses on commercial products
> We have mapped out five specific areas to focus on...

Hey Mozilla, that's not how focusing works.

ericyan··on Moved a server from one building to another with zero downtime
The consultants really should told the client that if all you have is a single server then there is no such thing as "zero downtime".
← PreviousPage 2 of 2