I believe I have successfully run a "two-armed" router experiment.
Please take a look at my setup and see if I am correct.

Two machines, Colossus-Guardian and Brontonomicon. They are connected by
two separate pairs of network interface cards.

The fast cards are 40 Gbits/sec and have just a crossover cable between
them.  The slow cards are 1 Gbit/sec and are attached to a switch.

Colossus-Guardian's address on the fast interface is 10.10.10.2 .
On the slow interface its address is 192.168.1.125 .

I am going to run a Dispatch Router on Bronto. It will accept tcp traffic
from an HTTP load generator over the fast link, and forward that traffic to
a webserver over the slow link.

Does that constitute a two-armed router?

Here is the config file I used for the router running on Bronto:


#-------------------------------------------
# This router is running on Brontonomicon.
#-------------------------------------------
router {
  mode: interior
  id: A
  workerThreads: 32
}

#-------------------------------------------------
# Listen for incoming TCP traffic on 40 Gbit
# interface with Colossus-Guardian.
#-------------------------------------------------
tcpListener {
  host: 10.10.10.1
  port: 9000
  address: two-armed
}

#----------------------------------------------------
# Connect out to Colossus-Guardian for TCP traffic
# on the 1 Gbit/sec interface.
#----------------------------------------------------
tcpConnector {
  host: 192.168.1.125
  port: 8080
  address: two-armed
}

Now on CG I start a webserver that is listening on port 8080.
It is this tiny Go program:

package main

import (
         "fmt"
         "html"
         "net/http"
       )

func main() {
  http.HandleFunc ( "/",
                    func(w http.ResponseWriter, r *http.Request) {
                      fmt.Fprintf(w,
                                  "Hello, %q",
                                  html.EscapeString(r.URL.Path))
                    })
  http.ListenAndServe ( ":8080", nil )
}


Then I start the 'hey' HTTP load generator, also on CG, with this command:

hey -c 10  -z 60s http://10.10.10.1:9000/index.html

That tells it to use 10 senders in parallel and to run for 60 seconds.
After a minute, I get this output:

Summary:
  Total:        60.0014 secs
  Slowest:      0.0066 secs
  Fastest:      0.0002 secs
  Average:      0.0006 secs
  Requests/sec: 22584.9772

  Total data:   27102620 bytes
  Size/request: 27 bytes


So!    Did I just successfully run a two-armed router ?

Reply via email to