Live data from Hacker News

Really Slow Site for Testing HTTP Caches.

reallyslowsite.com

11–20 of 23 posts

Re: Really Slow Site for Testing HTTP Caches.

#11

Hello, I have no doubt that this tool is really usefull. But as a non techie I dont understand the purpose. Can somebody explain me or refer me to an article that can explain why test HTTP caches and what is it?

reallyslowsite.com is designed to be a tool that developers can use to simulate how their application responds to expensive HTTP requests.

You could use this, for example, to test that your mobile application is properly caching HTTP requests (it would be noticeably slower, even with a fast connection, because the request is guaranteed to take at least 2 seconds).

The specific use case I had in mind when I created it was testing the HTTP caching that will be used internally by the OpenStack "glance" project.

Re: Really Slow Site for Testing HTTP Caches.

#12

Earlier quoted context omitted.

I rarely notice copyright lines. The fact that you did makes me suspect that they succeeded.

In his defense, the page is three lines long, one of which is the copyright line.

If it's important to them, perhaps they could... A/B test this? :-)

Re: Really Slow Site for Testing HTTP Caches.

#14
This site is slow :)

I don't know Ruby, but how does this work:

    get '/', :agent => /curl/ do
      (slow_thing, time) = slow_down(DEFAULT_SLEEP)
      "SLOWER THAN #{slow_ting}. Putting the brakes on for #{time} seconds.\n"
    end
It binds slow_thing and then references it as slow_ting (without the h) in the interpolation? What?

It appears twice so it must be intentional?

Re: Really Slow Site for Testing HTTP Caches.

#15

This site is slow :) I don't know Ruby, but how does this work: get '/', :agent => /curl/ do (slow_thing, time) = slow_down(DEFAULT_SLEEP) "SLOWER THAN #{slow_ting}. Putting the brakes on for #{time} seconds.\n" end It binds slow_thing and then references it as slow_ting (without the h) in the interpolation? What? It appears twice so it must be intentional?

Oops, that's a typo in code that hasn't been deployed yet. Our regression suite missed it ;-)

Re: Really Slow Site for Testing HTTP Caches.

#17

This site is slow :) I don't know Ruby, but how does this work: get '/', :agent => /curl/ do (slow_thing, time) = slow_down(DEFAULT_SLEEP) "SLOWER THAN #{slow_ting}. Putting the brakes on for #{time} seconds.\n" end It binds slow_thing and then references it as slow_ting (without the h) in the interpolation? What? It appears twice so it must be intentional?

Oops, that's a typo in code that hasn't been deployed yet. Our regression suite missed it ;-)

Ah, makes sense, you just get the empty string instead of "turtles marching through peanut butter".

I am used to Perl where your code won't compile if you reference an undefined variable in a string interpolation.

Re: Really Slow Site for Testing HTTP Caches.

#18

Earlier quoted context omitted.

In his defense, the page is three lines long, one of which is the copyright line.

If it's important to them, perhaps they could... A/B test this? :-)

Perhaps after reading two relevant articles :P I just posted a third, http://news.ycombinator.com/item?id=1824959, but not on the same series.

Re: Really Slow Site for Testing HTTP Caches.

#19
This is one of the things that node.js is really good at, and it's interesting that the sample code on the front page of nodejs.org was pretty similar to this app. Here's the rough equivalent in node:

  require('http').createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});
    var time = Math.max(0, Math.min(60000, parseInt(request.url.slice(1)) || 0));
    setTimeout(function() { 
      response.end('This page load took ' + time + 'ms\n'); 
    }, time);
  }).listen(8124);
(They have since changed it, and I suspect that it was because new users were confused as to why their supposedly "fast" server always took 2 seconds to respond to requests)

(edit: code formatting)

Re: Really Slow Site for Testing HTTP Caches.

#20
post #19

This is one of the things that node.js is really good at, and it's interesting that the sample code on the front page of nodejs.org was pretty similar to this app. Here's the rough equivalent in node: require('http').createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); var time = Math.max(0, Math.min(60000, parseInt(request.url.slice(1)) || 0)); setTimeout(function() {…

> This is one of the things that node.js is really good at

Why does every simple task motivate people to show some kind of "hello world" code in their favorite language and framework?

This web service is just a tiny exercise that is easily realized with a few lines in any language (even C or Bash) using any web server. In particular, I don't see in how far this code demonstrates the strengths of node.js.

Post reply on HN