All Projects → petabridge → Lighthouse

petabridge / Lighthouse

Licence: apache-2.0
Lighthouse - a simple service discovery platform for Akka.Cluster (Akka.NET)

Projects that are alternatives of or similar to Lighthouse

Rsf
已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor
Stars: ✭ 77 (-53.05%)
Mutual labels:  service-discovery, cluster
mmqtt
An Open-Source, Distributed MQTT Broker for IoT.
Stars: ✭ 58 (-64.63%)
Mutual labels:  akka, cluster
Cookim
Distributed web chat application base websocket built on akka.
Stars: ✭ 198 (+20.73%)
Mutual labels:  akka, cluster
Akka.net
Port of Akka actors for .NET
Stars: ✭ 4,024 (+2353.66%)
Mutual labels:  akka, cluster
Akkadotnet Code Samples
Akka.NET professional reference code samples
Stars: ✭ 451 (+175%)
Mutual labels:  akka, cluster
Justindb
⚛️ JustinDB is a highly available globally distributed key-value data store.
Stars: ✭ 147 (-10.37%)
Mutual labels:  akka, cluster
akka-cluster-minimal
Akka Cluster - absolute minimal
Stars: ✭ 16 (-90.24%)
Mutual labels:  akka, cluster
Scalecube Services
ScaleCube Services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing. its open and designed to accommodate changes. (no sidecar in a form of broker or any kind)
Stars: ✭ 482 (+193.9%)
Mutual labels:  service-discovery, cluster
Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (+736.59%)
Mutual labels:  service-discovery, cluster
Machine Learning In R
Workshop (6 hours): preprocessing, cross-validation, lasso, decision trees, random forest, xgboost, superlearner ensembles
Stars: ✭ 144 (-12.2%)
Mutual labels:  cluster
Lighthouse Badges
🚦Generate badges (shields.io) based on Lighthouse performance.
Stars: ✭ 150 (-8.54%)
Mutual labels:  lighthouse
Ssm Cluster
🍏Spring+SpringMVC+Mybatis+adminLTE3实现前后端分离(nginx负载均衡+tomcat集群)
Stars: ✭ 142 (-13.41%)
Mutual labels:  cluster
Cypress Audit
⚡️ Run Lighthouse and Pa11y audits directly in your E2E test suites
Stars: ✭ 145 (-11.59%)
Mutual labels:  lighthouse
Gardener
Kubernetes-native system managing the full lifecycle of conformant Kubernetes clusters as a service on Alicloud, AWS, Azure, GCP, OpenStack, EquinixMetal, vSphere, MetalStack, and Kubevirt with minimal TCO.
Stars: ✭ 2,093 (+1176.22%)
Mutual labels:  cluster
Kubify
Terraform Template to Setup a Kubernetes Cluster on OpenStack/AWS/Azure
Stars: ✭ 142 (-13.41%)
Mutual labels:  cluster
Puppeteer Cluster
Puppeteer Pool, run a cluster of instances in parallel
Stars: ✭ 2,175 (+1226.22%)
Mutual labels:  cluster
K8s Vagrant Multi Node
A Kubernetes Vagrant Multi node environment using kubeadm.
Stars: ✭ 141 (-14.02%)
Mutual labels:  cluster
Kafka Monitor
Xinfra Monitor monitors the availability of Kafka clusters by producing synthetic workloads using end-to-end pipelines to obtain derived vital statistics - E2E latency, service produce/consume availability, offsets commit availability & latency, message loss rate and more.
Stars: ✭ 1,817 (+1007.93%)
Mutual labels:  cluster
Akka
Build highly concurrent, distributed, and resilient message-driven applications on the JVM
Stars: ✭ 11,938 (+7179.27%)
Mutual labels:  akka
Amalgam8
Content and Version-based Routing Fabric for Polyglot Microservices
Stars: ✭ 152 (-7.32%)
Mutual labels:  service-discovery

Lighthouse

Lighthouse is a simple service-discovery tool for Akka.Cluster, designed to make it easier to play nice with PaaS deployments like Azure / Elastic Beanstalk / AppHarbor.

The way it works: Lighthouse runs on a static address and is not updated during deployments of your other Akka.Cluster services. You don't treat it like the rest of your services. It just stays there as a fixed entry point into the cluster while the rest of your application gets deployed, redeployed, scaled up, scaled down, and so on around it. This eliminates the complexity of traditional service discovery apparatuses by relying on Akka.Cluster's own built-in protocols to do the heavy lifting.

If you do need to make an update to Lighthouse, here are some cases where that might make sense:

  1. To upgrade Akka.NET itself;
  2. To install additional Petabridge.Cmd modules;
  3. To change the Akka.Remote serialization format (since that affects how Lighthouse communicates with the rest of your Akka.NET cluster); or
  4. To install additional monitoring or tracing tools, such as Phobos.

Running Lighthouse

The easiest way to run Lighthouse is via Petabridge's official Lighthouse Docker images on Docker Hub:

Linux Images

docker pull petabridge/lighthouse:linux-latest

Windows Images

docker pull petabridge/lighthouse:windows-latest

All of these images run lighthouse on top of .NET Core 2.1 and expose the Akka.Cluster TCP endpoint on port 4053 by default. These images also come with Petabridge.Cmd.Host installed and exposed on TCP port 9110.

Linux images also come with the pbm client installed as a global .NET Core tool, so you can remotely execute pbm commands inside the containers themselves without exposing Petabridge.Cmd.Host over the network.

This feature will be added to Windows container images as soon as #80 is resolved.

Environment Variables

Lighthouse configures itself largely through the use of Akka.Bootstrap.Docker's environment variables:

  • ACTORSYSTEM - the name of the ActorSystem Lighthouse will use to join the network.
  • CLUSTER_IP - this value will replace the akka.remote.dot-netty.tcp.public-hostname at runtime. If this value is not provided, we will use Dns.GetHostname() instead.
  • CLUSTER_PORT - the port number that will be used by Akka.Remote for inbound connections.
  • CLUSTER_SEEDS - a comma-delimited list of seed node addresses used by Akka.Cluster. Here's an example. Lighthouse will inject it's own address into this list at startup if it's not already present.

Here's an example of running a single Lighthouse instance as a Docker container:

PS> docker run --name lighthouse1 --hostname lighthouse1 -p 4053:4053 -p 9110:9110 --env ACTORSYSTEM=webcrawler --env CLUSTER_IP=lighthouse1 --env CLUSTER_PORT=4053 --env CLUSTER_SEEDS="akka.tcp://[email protected]:4053" petabridge/lighthouse:latest

Running in .NET Framework

You can still run Lighthouse under .NET Framework 4.6.1 if you wish. Clone this repository and build the project. Lighthouse will run as a Topshelf Windows Service and can be installed as such.

Examples of Lighthouse in the Wild

Looking for some complete examples of how to use Lighthouse? Here's some:

  1. Cluster.WebCrawler - webcrawling Akka.Cluster + Akka.Streams sample application.

Customizing Lighthouse / Avoiding Serialization Errors

When using Akka.NET with extension modules like DistributedPubSub or custom serializers (like Hyperion), serialization errors may appear in the logs because these modules are not installed and configured into Lighthouse by default. That is, required assemblies should be built into Lighthouse container.

As you may see in project file references, only Akka.Cluster and basic Petabridge.Cmd.Remote / Petabridge.Cmd.Cluster pbm modules are referenced by default, which means that if you need DistributedPubSub serializers to be discovered, you have to build your own Lighthouse image from source, with required references included.

Basically, what you have to do is:

  1. Get a list of Akka.NET extension modules you are using (Akka.Cluster.Tools might be the most popular, or any custom Akka.NET serialization package)
  2. Clone this Lighthouse repo, take Lighthouse project and add this references so that Lighthouse had all the same dependencies your Akka.Cluster nodes are using
  3. Build your own Docker image using Dockerfile (windows / linux) from this repository, and use your customized image instead of the default one

Workaround for DistributedPubSub

DistributedPubSub extension has role configuration setting, which allows to select nodes that are hosting DistributedPubSub mediators. You can use any role (let's say, pub-sub-host) in all your cluster nodes and set akka.cluster.pub-sub.role = "pub-sub-host" everywhere to exclude nodes that do not have this role configured.

If Lighthouse container is not configured to have this role, DistributedPubSub will not even touch it's node, which should also resolve the issue with serialization errors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].