Skip to content

Comment on Empty image src can destroy your site

Comments

alarmist headline - it's a minor inconvenience at best. possibly difficult to track down why there are such duplicate requests going to your site and where the empty img tag is, but it's hardly going to "destroy your site".

Consider a very popular website which runs on the last generation of software; that is, it is susceptible to the C10K problem (tl;dr: thread/process-based concurrency starts to choke at ~10,000 simultaneous connections, largely regardless of vertical scaling). The server, or each server in the pool, might run at 75% load normally.

And then traffic doubles.

It's easy to imagine the hurt.

Traffic won't double. Total traffic is all requests (images, stylesheets, scripts), not just requests to the root HTML page.

Not only that, but the client's browser probably caches it anyway.

You're assuming that your static assets (js, css, images) aren't served from a CDN (pretty much the standard at companies like Yahoo!). When your main server is serving just the HTML it's much more likely that your requests could double.

Any website serving its assets from a CDN will be a) unlikely to make a mistake like this empty image src thing, and b) have a well-cached front-page that would be unlikely to impact on server load.

Maybe. It's still a bit alarmist though. For 99% of sites, it will barely have an effect. Best practices for websites serving millions of pages a day truly are different than for websites serving thousands of pages a day. They are also different for web apps versus largely static pages. There is too much emphasis on absolutes in the web development community.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.