HTTP Source for Mezmo Edge
Description
You can configure any source to send data via a RESTful POST to a Mezmo Edge Pipeline.
When using the HTTP source, your content must be encoded appropriately, and packaged in a way that enables it to be parsed after ingestion. Structured formats, such as JSON, do not require additional parsing unless you want to further parse a specific value within the JSON.
You would typically use an HTTP request as a Source when the type of Source you want to send data from is not supported. For example, you may want to send and process data from an uncommon open source application. As long as you're able to use a RESTful POST transport to send the data to an endpoint, you can send the data into the Pipeline.
Configuration
This Source requires an allocated port that you will forward the data to. You must use a port that has been configured within your Edge instance during set up.
The default Edge port range is 8000-8010, unless you modified it during set up.
Configuration Options
Setting | Description |
---|---|
Title | A name for your source. |
Description | A short description of the source. |
Port | The port number to listen on within the Edge instance. |
Exposing for External Ingress
It is highly recommended that a scalable load balancer be used like Nginx. The following is a simple example using the default LoadBalancer for your system which ignores TLS and the like.
A simple, non-prod method of exposing the HTTP Source to external ingress is to use the system default LoadBalancer.
To do this we will create a load balancer service which exposes the port configured by the HTTP Source.
Sample Config: edge-load-balancer.yaml
apiVersion v1
kind Service
metadata
name edge-load-balancer
spec
ports
name http-source-1a
port <<HTTP_SOURCE_PORT>>
protocol TCP
targetPort <<HTTP_SOURCE_PORT>>
selector
app.kubernetes.io/instance <<EDGE_INSTANCE>>
app.kubernetes.io/name <<EDGE_NAME>>
sessionAffinity None
type LoadBalancer
Replace HTTP_SOURCE_PORT
with your configured port and EDGE_INSTANCE
+ EDGE_NAME
with those found in your edge services description. You can find your instance
and name
via a command like
kubectl get service EDGE_SERVICE_NAME -o yaml > tmp.yaml
Finally, apply to your cluster with the following command
kubectl apply -f edge-load-balancer.yaml
You can now send data to the HTTP Source by routing data to http://EXTERNAL_IP:HTTP_SOURCE``_PORT
. Note th