```
require 'net/http'

def server_available?(addr, port, headers)
  http = Net::HTTP.new(addr, port)
  http.open_timeout = 2
  http.read_timeout = 2
  response = http.get("/", headers)
  response.code == "200"
rescue StandardError => se
  puts "Connection Failed"
  false
end

start_time = Time.now
puts "Starting: #{start_time}"
server_available?("169.254.169.254", 80, {'X-Google-Metadata-Request' => 'True'})
puts "Complete: #{Time.now}, elapsed: #{Time.now-start_time}"
```