Wednesday, December 20, 2006

Blogger And Images

So far I must say I'm not impressed with the new Blogger. Particularly the data management aspect. And I'm talking about photos in particular. Before the new system all photos requested their data from what appeared to be the same server and the requested image was returned, but now there are about four server references (bp{0-3}.blogger.com) that can get randomly assigned, which then redirect you to other servers where the picture is actually stored. Plus, the server storage is just as likely to be offline and not return anything as it is to actually work. I've been seeing lots and lots of empty frames where pictures should be on blogspot blogs these days from where the server simply doesn't or fails to load the requested picture (I'm hoping his aspect is temporary though as they work out bugs in the new system).

And the new system they have to store your uploaded pictures is simply nuts. When you upload a picture these days you appear to be randomly assigned one of these "bp" servers with a link to your picture. Let's take an example picture. Below is a concept picture I took trying to duplicate the effect in a picture Ben showed me of the national Christmas tree. Although in the shot Ben showed me the camera must have been mounted better because the light lines look flat and aren't shaky like they are in mine (I got the shakes real bad apparently).


Now let's really start looking at what's going on behind the scenes here. If you click on the above picture, it takes you to a new URL location. If you examine the entire URL it would appear that you've now gotten to a file that ends with ".jpg". Here's the kicker though, notice that the image itself at this point is probably too big to view on the screen at once and you have to scroll around to see it all (those of you running your browser full screen at 1600x1200 will just have to trust me on this one). Normally IE and Firefox have little quick clicks that allow you to switch between the maximized image and the 'fit on the screen' image. Not so here. To make things even stranger, look at the page source. The ".jpg" file actually returned html code that has now directed you to another server entirely to actually get to the picture (the URL says you're going to "bp0.blogger.com", but the internal html points to "lh3.google.com" (at least that's where it pointed when I checked, it's possible that pointing part is dynamic and changes on subsequent loads, but I haven't looked into it closely enough to know whether that's the case yet).

If you go to the location pointed to by "lh3.google.com", you'll see it actually returns an image file at this point. So it looks like they're pointing to a server farm, which in turn points to another server farm where the picture actually lives. It gets better, in that first URL (the "bp0.blogger.com" one), try changing bp0 to bp1, bp2, and bp3. They all seem to work and return the same html code. You can do the same thing for the "lh3.google.com" URL, but there lh0 through lh2 don't seem to work. But lo and behold if you replace lh3 with lh4, lh5 and lh6 it all returns the actual picture. So at this point I was thinking, they've got a two sets of aliased server names where each set points to a particular file system. But then almost by accident I found another interesting tidbit when I was looking at this with Barry the other day. I was at the bp0.blogger.com URL and if you compare the "bp" URL with the "lh" URL, you'll notice the URL looks very similar except for in the "bp" URL one directory name has "s1600-h" while in the "lh" URL it's simply "s1600". So guess what happens on the "bp" URL if you remove the "-h". That's right, it simply loads the image. The reverse is true also. If you load the lh URL and get the image, then add a "-h" to the end of the "s1600" directory then it will redirect you to loading that html source again. So all these servers are pointing to the same file system (which somewhat verified if you examine the results of running dig on the servers, they all resolve to the same address). Why blogger is suddenly giving you html code to view images, I have no idea. I will say I don't like the way it's currently working. For the most part I didn't see the problem, because I always shrink my images down to around 800 pixels before I upload them, and because of that I hadn't see the non-resizing issue when you view a picture through blogger. What I really don't understand is the why. It seems like by having the "bp" servers return html which then has the "lh" server return the image you're actually making more requests across the network than you were before (and since they appear to be resolving to the same server filesystem, they're increasing the load on that file system). And because all the servers appear to be working within the same filesystem and session information, I don't really see the point of the extra layers.

My current guess is this has something to do with merging Blogger with Picasa's Web Album photo storage. I say this because last night to upload pictures I suddenly had to agree to new terms of service (update 12/13/2006) for using images with Blogger. If you follow the link about what this new terms of service it, it takes you to the terms of service for Picasa's Web Albums. This makes me wonder if there will suddenly be a limit of 250 MB on pictures you can upload (since I believe that's the currently limit for Picasa Web Albums). If anyone knows why they changed it to this new method, I love to hear some theories.

6 comments:

Curt Sawyer said...

I think you should e-mail this entire post to those bastards running this fly-by-night operation.

I've said it before and I'll say it again - if I didn't already have years invested in blogger I'd move to another service.

JamesF said...

While I disagree with a lot of what they did, I can't argue completely against it without knowing their reasons. Also, the service is free, that has to be factored into the equation in some way (the whole you get what you pay for mentality).

sattvicwarrior said...

thanks for that . i DIDNT download it because i didnt want to become a Guinea Pig for thier new programme. DONT rationalize it. it may be free. . " it being free' etc. that s like someone giving you a car without a steering wheel and saying " good luck".
thanks for sharing

Unknown said...

You can always switch to Wordpress on your own domain. I started a port with the food blog but I just didn't have the time to deal with redoing alot of the pictures. I will put it like this -- it's easy but you need to have a full weekend to get it done.

Curt Sawyer said...

I have a 14-month-old. I don't have an entire weekend to devote to porting something.

Anonymous said...

Removing the "-h" after s1600-h no longer works. Now instead of getting an image in your browser that will fit the size of the window, you're prompted to save the file or open it with an image viewer. Argh. http://tinyurl.com/37bv4w is way too technical for me, but at least I know it's not just me that's having this problem.