# If some condition is met, slow down the response
if (req.http.user-agent ~ "badbot") {

  # Emit 300 bytes per 1 second
  resp.tarpit(1, 300);
}