?

Log in

No account? Create an account
Watch me hard-core blog! - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Watch me hard-core blog! [Oct. 9th, 2003|03:56 am]
Brad Fitzpatrick
So, on September 23rd, some guy named Jonathan told some guy named John about memcached, and he wrote:
...

memcached + zeroconf-based formation/management features would be pretty interesting: It would be nice if the clients didn't have to hard-code the addresses of the cache nodes.
A most interesting idea, John!

But the more I think about it, nodes flickering on/off would cause buckets to change, killing cache hit rates. Or worse: netsplits, where you store a val1 in key foo, then store val2 in foo (now on a new server), that server goes down, then you retrieve foo and get val1, on the old server. Handling that would kinda suck.

I guess you could get away from the hash of hashes model (where nodes aren't buckets), and actually replicate content around, but I think that's the wrong way to go... LJ hits over 50% cache hit rate after being empty in like seconds. So maybe we shouldn't care about cache hit rates going to zero when servers go on/off-line and just worry about the netsplit problem?

My god... this is my first hard-core blogging, where I quote/link to other people. I feel so dirty.
LinkReply

Comments:
[User Picture]From: supersat
2003-10-09 04:16 am (UTC)
You should feel dirty for using the word "blog."
(Reply) (Thread)
[User Picture]From: brad
2003-10-09 04:20 am (UTC)
I blogged your mom last night. And I blogged it.
(Reply) (Parent) (Thread)
From: evan
2003-10-09 08:33 am (UTC)
I blogged your blog last blog. And I blogged blog.
(Reply) (Parent) (Thread)
From: evan
2003-10-09 08:34 am (UTC)
Oh, and you need to "trackback" him so you can increase your Google pagerank.
(Reply) (Parent) (Thread)
[User Picture]From: whitaker
2003-10-09 10:19 am (UTC)
hahaha. success. :-P
(Reply) (Parent) (Thread)
[User Picture]From: skittl1321
2003-10-09 05:11 am (UTC)

Do screened comments get mailed to the top of the thread?

Blog is on the main page. That made me sad :(


(Brad, sorry for commenting in your journal, I really try not to.)
(Reply) (Parent) (Thread)
[User Picture]From: texel
2003-10-10 03:26 am (UTC)

Re: Do screened comments get mailed to the top of the thread?

blog is on the blog blog. that blog me blog :(

(brad, sorry for blogging in your blog, i really blog not to)
(Reply) (Parent) (Thread)
[User Picture]From: mart
2003-10-09 05:36 am (UTC)

Next thing you know you'll be hacking category support into your blogging software so that you can separate your “Tech” posts from everything else… haha.

(Reply) (Thread)
From: evan
2003-10-09 08:33 am (UTC)
Don't laugh! I'd use it. :P
(Reply) (Parent) (Thread)
[User Picture]From: mart
2003-10-09 01:26 pm (UTC)

Sadly, so would I!

(Reply) (Parent) (Thread)
From: ex_snej373
2003-10-09 09:38 am (UTC)
I totally want categories. Not just to spare people from posts of mine about things they don't care about, but even more so to spare me from boring friend posts about politics 'n' stuff.

LJ is the only bl**g*ng system I know of that doesn't support categories.
(Reply) (Parent) (Thread)
[User Picture]From: brad
2003-10-09 02:52 pm (UTC)
Yeah, I want it too.
(Reply) (Parent) (Thread)
From: sergent
2003-10-12 07:34 pm (UTC)
Hi!

The multicast thing was John's idea, and it sounded interesting at first, but my reaction was that I didn't think it would work out well from a complexity point of view. Clearly a bunch of things don't work right when the size of the group changes, and fixing them is arguably harder than updating the list of servers and flushing the cache, especially given that it shouldn't happen very often. And it seems like there are already decent failover semantics when one of the servers goes down, which is the most interesting case for this sort of dynamic reconfiguration. I tried to post a comment to his entry saying as much, but it disappeared off into the ether and I didn't feel like writing it over again.

Is dealing with a pre-configured (hard-coded sounds wrong, as if you will have to recompile code to change it) list of servers that hard?

Or maybe the right approach and the one that I'm missing is that you should flush the cache when the group size changes but that you can still detect group size changes over multicast. But, off the top of my head, that seems to be bad too because it means you have to have a group leader and all the machinery necessary to choose one or some nasty race conditions.

Jonathan

(Reply) (Thread)
[User Picture]From: brad
2003-10-12 08:34 pm (UTC)
LiveJournal's config file is automatically stat'ed and reloaded every 10 seconds or so. If we change the memcached servers, our entire web pool is updated automatically.... it's very easy to maintain.

But that's with Perl and our framework. It'd be cooler to make it that easy for everybody. All APIs should just have an "app domain" parameter, and they discover memcached servers serving that app domain automatically.
(Reply) (Parent) (Thread)