?

Log in

No account? Create an account
Paid Members [entries|archive|friends|userinfo]
Paid Members

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Paid user "express lane" [Jul. 8th, 2004|03:22 pm]
Paid Members

paidmembers

[bradfitz]
New paid user feature!

If you're logged in as a paid user, you "cut in line" of other web requests that we've received but not yet generated a response for.

So our load balancer retrieves all incoming web requests immediately after your browser sends them, then sorts those requests into two lines: free users and paid users.

Whenever a real server (not the load balancer) is ready to do more work, it always fulfills a request from the paid user line, and only does free user requests once no paid users are waiting.

We've had this done for a couple weeks, but just put it live today. We were going to wait to announce it until we had the cool part done, but thought it best you all know what's up. The cool part is: we're going to make the load balancer tell the real servers how many seconds/milliseconds you saved by cutting in line and how many people you cut in front of, and then the real servers will add that to the response, so you can do "View Source" in your browser and at the top it'll show you those stats, so you can verify it's working.

This is all different from what we did a few years ago, which was to have "free servers" and "paid servers". Instead all the servers do both free and paid, but access to the servers is prioritized by your account type.

Here are some stats of it in action:
queues
web_proxy-normal.age 0
web_proxy-normal.count 3
web_proxy-highpri.age 0
web_proxy-highpri.count 0
.
queues
web_proxy-normal.age 0
web_proxy-normal.count 0
web_proxy-highpri.age 0
web_proxy-highpri.count 0
.
queues
web_proxy-normal.age 0
web_proxy-normal.count 4
web_proxy-highpri.age 0
web_proxy-highpri.count 0
.
queues
web_proxy-normal.age 1
web_proxy-normal.count 4
web_proxy-highpri.age 0
web_proxy-highpri.count 0
.
queues
web_proxy-normal.age 0
web_proxy-normal.count 3
web_proxy-highpri.age 0
web_proxy-highpri.count 0
.
queues
web_proxy-normal.age 0
web_proxy-normal.count 5
web_proxy-highpri.age 0
web_proxy-highpri.count 0
.


At the top it showed there were 3 free users (waiting for less than a second --- age 0) waiting to get responses, and 0 paid users. Then it was all clear, then 4 new free users were waiting, then waiting up to a second, then those cleared, and 3 new free users were waiting under a second. Then 5 later, still under a second.

But throughout, no paid users were ever waiting.

Obviously the above isn't an interesting demo of this feature, but next time we hit a hiccup and the site gets slow, the paid users will be affected the least, since you won't have to wait in line long for a page to be generated. (just have to wait for paid users that came before you)
LinkReply

Comments:
[User Picture]From: abates
2004-07-08 04:04 pm (UTC)
Er, if you've already loaded your friends page because you wanted to read the entries on it, getting stuff out of the source doesn't hit LiveJournal at all.
(Reply) (Parent) (Thread)
[User Picture]From: ghostlight
2004-07-08 04:26 pm (UTC)
¿So wait, now I have to spend five seconds opening up my friends page, then ten seconds opening up a client to see how much time I've saved?


I want a refund on your idea.
(Reply) (Parent) (Thread)
From: subbes
2004-07-08 04:37 pm (UTC)
oic
(Reply) (Parent) (Thread)
[User Picture]From: abates
2004-07-08 04:44 pm (UTC)
Soz, I was assuming it was being loaded in a client. (I only tend to use a browser and the web site, so I have little idea what the capabilities of the clients are for loading friends pages.)
(Reply) (Parent) (Thread)
[User Picture]From: ghostlight
2004-07-08 04:57 pm (UTC)
I click on mine and it loads the default browser.
(Reply) (Parent) (Thread)
From: subbes
2004-07-08 04:32 pm (UTC)
...not if you only posted an entry,m and want to see how much time THAT saved.

Using a client to see how fast loading something into one's browzser was is just silly. i'm referring to other operations, like f-list changes, or entry posting.
(Reply) (Parent) (Thread)
[User Picture]From: abates
2004-07-08 04:47 pm (UTC)
Correct me if I'm wrong, but posting an entry from a client doesn't go via HTTP, does it?
(Reply) (Parent) (Thread)
[User Picture]From: ruakh
2004-07-08 05:54 pm (UTC)
(Reply) (Parent) (Thread)
[User Picture]From: abates
2004-07-08 07:11 pm (UTC)
Doh! :)
(Reply) (Parent) (Thread)
[User Picture]From: cuban321
2004-07-08 05:56 pm (UTC)

Yes, it does...

19:56:29.713222 192.168.5.103.34179 > livejournal.com.www: S 2766081987:2766081987(0) win 5840
[Error: Irreparable invalid markup ('<mss [...] 0,nop,wscale>') in entry. Owner must fix manually. Raw contents below.]

19:56:29.713222 192.168.5.103.34179 > livejournal.com.www: S 2766081987:2766081987(0) win 5840 <mss 1460,sackOK,timestamp 14969698 0,nop,wscale 0> (DF)
19:56:29.775806 livejournal.com.www > 192.168.5.103.34179: S 1661617916:1661617916(0) ack 2766081988 win 8192 <mss 1460>
19:56:29.775861 192.168.5.103.34179 > livejournal.com.www: . ack 1 win 5840 (DF)
19:56:29.775942 192.168.5.103.34179 > livejournal.com.www: P 1:81(80) ack 1 win 5840 (DF)
19:56:29.848262 livejournal.com.www > 192.168.5.103.34179: . ack 81 win 8192
19:56:29.848298 192.168.5.103.34179 > livejournal.com.www: P 81:104(23) ack 1 win 5840 (DF)
19:56:29.849009 livejournal.com.www > 192.168.5.103.34179: . ack 81 win 5840 (DF)
19:56:29.856631 dns.dfw1.speakeasy.net.domain > 192.168.5.103.32947: 61285 1/0/0 (73) (DF)
19:56:29.908359 livejournal.com.www > 192.168.5.103.34179: . ack 104 win 5840 (DF)
19:56:32.880490 livejournal.com.www > 192.168.5.103.34179: FP 1:420(419) ack 104 win 5840 (DF)
19:56:32.881674 192.168.5.103.34179 > livejournal.com.www: F 104:104(0) ack 421 win 6432 (DF)
19:56:32.886259 192.168.5.103.32947 > dns.dfw1.speakeasy.net.domain: 18873+ A? www.livejournal.com. (37) (DF)
19:56:32.909454 dns.dfw1.speakeasy.net.domain > 192.168.5.103.32947: 18873 1/0/0 A livejournal.com (53) (DF)
19:56:32.941704 livejournal.com.www > 192.168.5.103.34179: . ack 105 win 5840 (DF)
19:56:33.177278 192.168.5.103.34180 > livejournal.com.www: S 2772218502:2772218502(0) win 5840 <mss 1460,sackOK,timestamp 14973163 0,nop,wscale 0> (DF)
19:56:33.237544 livejournal.com.www > 192.168.5.103.34180: S 1718229425:1718229425(0) ack 2772218503 win 8192 <mss 1460>
19:56:33.237601 192.168.5.103.34180 > livejournal.com.www: . ack 1 win 5840 (DF)
19:56:33.237761 192.168.5.103.34180 > livejournal.com.www: P 1:82(81) ack 1 win 5840 (DF)
19:56:33.305133 livejournal.com.www > 192.168.5.103.34180: . ack 82 win 8192
19:56:33.305186 192.168.5.103.34180 > livejournal.com.www: P 82:527(445) ack 1 win 5840 (DF)
19:56:33.307377 livejournal.com.www > 192.168.5.103.34180: . ack 82 win 5840 (DF)
19:56:33.380716 livejournal.com.www > 192.168.5.103.34180: . ack 527 win 6432 (DF)
19:56:34.372216 192.168.5.1.11560 > 192.168.5.255.snmp-trap: Trap(35) E:3955.2.2.1 192.168.5.1 enterpriseSpecific[specific-trap(1)!=0] 6777157 [|snmp]
19:56:36.336108 livejournal.com.www > 192.168.5.103.34180: FP 1:291(290) ack 527 win 6432 (DF)
19:56:36.336812 192.168.5.103.34180 > livejournal.com.www: F 527:527(0) ack 292 win 6432 (DF)
19:56:36.401324 livejournal.com.www > 192.168.5.103.34180: . ack 528 win 6432 (DF)
(Reply) (Parent) (Thread)
[User Picture]From: maully
2004-07-08 10:18 pm (UTC)
Off-topic but has anyone ever told you you look a lot like Amy Acker, from Angel, in that icon?
(Reply) (Parent) (Thread)