Skip to content

Remote Worker Communication

chuckablack edited this page Nov 24, 2020 · 9 revisions

Overview

In quokka, "remote workers" are python programs that run in the background and perform various functions on behalf of the quokka server. Today, those functions are few:

  • Packet capture
  • Port scans (extended)
  • Traceroute

Remote workers were created out of necessity - the functionality required by either scapy or nmap, which perform the underlying functionality, require root access, and since running as root is a bad idea for a web server, these functions were 'outsourced' to the external python programs.

Initial Implementation

As external Python programs, there needed to be a means of communication between the quokka server, and these external programs. Initially, quokka opted to use two separate communication methods, in significant part due to the nature of the first such functionality, packet capture:

  • quokka --> capture-worker: This would use a messaging tool, in our case 'rabbitmq', which is a popular messaging service. There is one message, sent from quokka to the capture-worker, instructing it to begin packet capture.
  • capture-worker --> quokka: This would use HTTP, sending captured packets to the quokka server, as each packet is received.
Clone this wiki locally