Jan Kneschke works for the MySQL Development Team and is the author of the very popular lighttpd web server. I recently had the opportunity to ask him a few questions about himself and his work.
In our last installment, we looked at how to write data
into a storage engine, now lets look at updating it.
To update data you need to first know that it exists. To do this
MySQL reads the rows that need to be updated, either by index or
scan read. Since we have already spoken on scan reads, we are
going to look at updates that occur that need to scan the entire
table. MySQL will start up a read and do the folllowing:
rnd_init()
rnd_next()
rnd_next()
rnd_next()
update_row()
rnd_next()
rnd_next()
rnd_end()
In the above example, MySQL find four rows in the table. The
third row is matched for an update. The engine writer doesn't
have to do to the predicate test themselves (aka ... UPDAT E A
SET b=5 WHERE a=3, the engine writer doesn't need to worry about
matching the a=3). The …
I recently saw the Planet MySQL post Five months with MySQL Cluster by Brian Moon.
Thought I’d add my 5 cents worth (Australian’s don’t have 1 cent coins any more to make 2 cents worth)
Firstly, it’s great you wrote about your experiences in moving to MySQL Cluster. I think more people should.
Joins
“We used a lot of joins. We learned (later) that joins in the cluster are not a good idea.”
MySQL Cluster’s number one strength is Primary Key Lookups, it’s very good you learned that joins (especially say 5-6-7 table joins) are not a good idea, it is not a strength, and certainly not scalable to thousands of queries per second.
Rewrite
“We rewrote our application (basically, our public web site) to use …
[Read more]So, the whole world changed at dealnews when Yahoo! linked us. We realized that our current infrastructure was not scaling very well. We had to make a change.
The Problem
Even though we were using all sorts of cool techniques, the server architecture was really still just a bunch of web servers all serving the same content. In addition to that, our existing systems as the time used a pull method. When a request came in, memcache was checked, if the data was not there, it was fetched from our main MySQL server. So, when there is no data in the cache or when it expires, this was very bad. Like when Yahoo! hit us. Some cache item would expire and 60,000 users would hit a page and each page would try and create the cache item.
The Solution
I …
[Read more]A short post to draw your attention to this article by Kevin Burton titled “MySQL and the Death of Raid”. Although it’s written from the MySQL point of view, he does bring up some interesting points on the advantages of what he calls a “RAISe” or Redundant Array of Independent Servers” architecture (actually I coined [...]
Mohd Irwan Jamaluddin, RHCE from Malaysia, writes about his experience with DRBD and MySQL on RHEL 5 after some mixed emotions with MySQL Cluster and Continuent uni/cluster. I always love to read from happy sysadmins out there. What I like to hear best, in terms of adapting your application for an HA environment, is this:
MySQL configuration: Nothing much to talk about MySQL, I’m just using default packages (and default configurations) from RHEL 5.
Now, for those who don’t like the idea of compiling Heartbeat
from source, you can of course also use Red Hat’s own cluster
manager with DRBD. And then if you’re on MySQL Enterprise,
there’s no need to compile even DRBD, as you get the binary RPMs
for that as well.
…
Mårten responded right away to my challenge . (thank you Mårten), his responses below:
1) Team
A superb team is a must in all start-ups. The special thing with open source startups is that they may have a history as an open source *project* before becoming a commercial business. The team must understand how to master this evolutionary transition.
2) Innovation
It’s not enough to be less expensive, or faster, or the same as others but open source. There has to be a genuine, value-adding innovation that users and customers get a new benefit from.
3) Participation
The strength of open source lies in massive participation by
users worldwide. It takes special dedication and skill to build
an
architecture of participation.
-1) Open source as the silver …
[Read more]As open source and open source business is rapidly becoming mainstream as witnessed e.g. by the latest estimates from IDC , I felt it was an appropriate time to try to get some feedback from entrepreneurs and experts in this space about some of the do’s and don’ts they have learned over the years building open source businesses.
But first my own observations:
3 Success factors / best practices:
1) Solid value proposition
Pretty obvious, but it is surprising how difficult at it is to explain your product or service offering concisely and compellingly.
2) Business model that supports healthy margins
There are challenges in the open source business where you are competing against incumbents with an offering that typically seems to be priced lower, or at least in my experience I …
[Read more]RAID is dying. Shocked? The prediction might be a bit early for some folks. It’s still somewhat conventional for some people to think that RAID is a conservative way to scale your IO.
I’d like to assert that in 3-5 years RAID will be a thing of the past.
Want some evidence? Google doesn’t use RAID. They’ve build a database infrastructure which avoids expensive and proprietary hardware controllers.
You could call it a redundant array of inexpensive servers.
Other scale out shops which don’t have access to such toys have built out sharded MySQL installations. LiveJournal, Flickr, Facebook. These shops are using RAID in some situations but they …
[Read more]MySQL Archiver is the implementation of the efficient forward-only archiving and purging strategies I wrote about more than a year ago. It nibbles rows from a table, then inserts them into another table and/or writes them to a file. The object is to do this without interfering with critical online transaction-processing (OLTP) queries.