LGF Database Mongo Makeover

Charles Johnsonfollow me on twitter
Tue Apr 3, 2007 at 4:44 pm PDT • Views: 842

I’d guess that 90%+ of LGF’s readers aren’t aware that something huge happened here over the weekend. And that’s exactly the result for which I was hoping.

The entire back-end LGF Blog Engine was swapped out, while the site was live. The whole thing. It’s a little like rebuilding a car’s engine while driving at 75 mph. (A little.)

OK. Maybe 45 mph. Since it was the weekend and most readers weren’t at “work.”.

Yesterday the LGF Long-Running Hamster Squad in server 1 had a rest for the first time in five years. Whew. The main server was operating at much lower loads than usual, since the site is now split between the display portion (on server 1) and the data portion (on server 2). And the newly recruited Hamster Squad in server 2 had a moderately stressful, but certainly not nervous-breakdown-inducing time of it. Neither server ever got close to the danger zone.

The new architecture is very, very scaleable (an adjective that should appeal to lizards). This means that as traffic/bandwidth/server resources increase, I can simply add new servers to handle the load, with the requisite hamsters. That’s the theory, anyway. We’ll see about the practice.

And today I added another very nice feature I’ve been developing and testing for a while, that will be completely invisible to most of our readers; the session information (which keeps track of your login information when you post comments, and lets us display the current number of visitors online) is now stored in the MySQL database, along with the majority of the site data.

Why? Because the default PHP session management functions use files on the disk to store data—and the whole point of this upgrade is to get away from flat files, to reduce overhead on our main web server. So now it’s all in MySQL, and another big source of disk thrashing has been eliminated. Not only that, it gives me a huge amount of flexibility in how I handle the sessions, what data I store, etc., and it’s much more secure than the default flat-file method.

So how’s the makeover working so far, for its main purpose of helping us stay online during major traffic surges?

Well, the last time Fark.com linked to us, the traffic took us offline; the web server crashed and had to be rebooted. We all know how painful that can be.

Today we had not one, but two links on Fark—and although the load got pretty high and we slowed down a bit, we never were close to a server crash.

That’s a great sign.

Next step: setting up replication so we’ll have a hot backup and a fall-back server for emergencies. (And by the way, as a result of all this expansion, hosting costs have increased tenfold—but it was necessary.)

Advertisement

213 comments

^ back to top ^

Name:

Pass:

Register Forgot Your Password? Re-send Confirmation (To log in, cookies must be enabled in your browser!)

Turn off ads by subscribing!
For about 33 cents a day, our subscription option turns off all advertisements at LGF!
Read more...


► LGF Headlines

  • Loading...

► Tweeted Articles

  • Loading...

► Tweeted Pages

  • Loading...

► Top 10 Comments

  • Loading...

► Bottom Comments

  • Loading...

► Recent Comments

  • Loading...

► Tools/Info

► Tag Cloud

► Contact

You must have Javascript enabled to use the contact form.
Your email:

Subject:

Message:


Messages may be published in our weblog, unless you request otherwise.
Tech Note:
Using the Contact Form

More Partners

Compare Electricity Prices in your area. Texas Electricity is deregulated; you have the right to choose Texas Electric Rates from among many Texas Electric Companies.

We are aware of all Internet traditions.

TwitterFacebook
LGF Pages
Recent Pages

Daniel Ballard
Late Afternoon Light-Kalanchoe
3 hours, 10 minutes ago
Views: 55 • Comments: 0
Tweets: 0 • Rating: 2

MikeySDCA
Colin Powell Endorsed Same-Sex Marriage Once It Was Safe, More Evidence He's Hardly a Great Leader.
3 hours, 14 minutes ago
Views: 54 • Comments: 0
Tweets: 0 • Rating: 0

researchok
Attachment Birthers
3 hours, 23 minutes ago
Views: 59 • Comments: 0
Tweets: 0 • Rating: 0

Eclectic Infidel
City College of San Francisco Budget Update
4 hours, 3 minutes ago
Views: 74 • Comments: 0
Tweets: 0 • Rating: 0

Michael McBacon
Kansas governor signs 'Shariah bill' to ban Islamic law
8 hours, 33 minutes ago
Views: 175 • Comments: 6
Tweets: 0 • Rating: 4

Aigle
National Geographic Traveler Veers Off Track
1 day, 8 hours ago
Views: 407 • Comments: 5
Tweets: 0 • Rating: -4

MichaelJ
Apple TV Slated to Debut in December?
1 day, 9 hours ago
Views: 205 • Comments: 0
Tweets: 0 • Rating: 1

Ascher
Israeli Who Saved Turk on Everest: You Never Abandon a Friend - Israel News, Ynetnews
1 day, 11 hours ago
Views: 273 • Comments: 1
Tweets: 0 • Rating: 3

Haywood Jabloeme
The Harrassment of Patterico & Its Roots in Left-Wing Activism
1 day, 11 hours ago
Views: 490 • Comments: 2
Tweets: 0 • Rating: 4

Curt
Brian Banks: (Video) Falsely accused of rape speaks out
1 day, 13 hours ago
Views: 247 • Comments: 1
Tweets: 0 • Rating: 3

 Frank says:

I'd like to know who's Plunkin' the monkeys? -- It was on the Tonight Show with Johnny Carson. I can't remember the year maybe 10 years ago? They were talking about AIDS and how AIDS all got started, he had 3 theory's. First Frank said something about AIDS being a government test gone wrong Then maybe it was an Alien (ET) test or mistake and finally they talked about the theory of AIDS coming from a monkey and then Frank said " I'd like to know who's plunkin' the monkey's?"