AppSwitch performs service discovery, access control, traffic management and telemetry functions on behalf of the applications by transparently and efficiently interposing the applications’ network API calls. In addition, AppSwitch decouples the application from the constructs of underlying network infrastructure by projecting a consistent, virtual view of the network to the application. In abstract terms, AppSwitch can be thought of as the docker equivalent for the networking stack. It combines the application-level functionality of a service mesh with the familiarity and compatibility of traditional networking.
Some of the use cases include:
- Automatically curated service registry for seamless service discovery even across hybrid environments.
- Extremely efficient enforcement of label-based access controls without any data path processing.
- Proxy-less load-balancing and traffic management across service instances.
- IP address portability with ability to assign arbitrary IP addresses to applications regardless of underlying network.
- Transparently redirect connection requests to alternate services without using NAT in case of application migration.
- "flat" connectivity with client IP preservation across hybrid network environments.
Installation of the binary (copying to /usr/bin) and bringing up of the daemon can be done with the following compose file:
# # Bring up with: # docker-compose up -d appswitch # version: '2.3' volumes: appswitch_logs: services: appswitch: image: appswitch/ax pid: "host" network_mode: "host" privileged: true volumes: - /usr/bin:/hostbin - /var/run/appswitch:/var/run/appswitch - appswitch_logs:/var/log environment: - AX_DRIVER=user # Syscall forwarding driver - AX_NODE_INTERFACE= # Node interface to use by daemon. Accepts IP address or interface name, eg eth0 - AX_NEIGHBORS= # List (csv) of IP addresses of cluster neighbors - AX_CLUSTER= # Cluster name. Required if cluster is part of a federation - AX_FEDERATION_GATEWAY_IP= # IP address or `interface` name for federation connectivity - AX_FEDERATION_GATEWAY_NEIGHBORS= # List (`csv`) of IP addresses of federation neighbors (other gateway nodes) - AX_OPTS=--clean # Remove any saved state from previous sessions
ax run --ip 22.214.171.124 --expose 8000:10.0.2.23:9000 python -m SimpleHTTPServer 8000 1>/dev/null &
$ ax run -- curl -I 126.96.36.199:8000 HTTP/1.0 200 OK Server: SimpleHTTP/0.6 Python/2.7.5 Date: Tue, 12 Jun 2018 18:51:23 GMT Content-type: text/html; charset=UTF-8 Content-Length: 660 $ curl -I 10.0.2.23:9000 HTTP/1.0 200 OK Server: SimpleHTTP/0.6 Python/2.7.5 Date: Tue, 12 Jun 2018 18:51:56 GMT Content-type: text/html; charset=UTF-8 Content-Length: 660
- AppSwitch Website
- AppSwitch Documentation
- For core principles behind AppSwitch and its internals, look at this research paper.