markheath / globoticket-dapr

A simple Dapr demo microservices application
59 stars 38 forks source link

Self-hosted Dapr on multiple machines. Is it possible? #1

Closed AlexanderKapelyukhovskiy closed 2 years ago

AlexanderKapelyukhovskiy commented 2 years ago

I would like to run self-hosted services on different hosts. If it is possible please provide some example or link to documentation with details. My Monolith is running on several physical machines but is not ready for migration to .NET core and as result I can't use Kubernetes. Single option for me is self-hosted dapr sidecars but I can't see if it is even possible.

markheath commented 2 years ago

Yes, this is perfectly possible, you'd just need to use an appropriate host name resolution component. The default is mDNS, which I don't know if would work in your scenario, but you can use HashiCorp Consul instead

AlexanderKapelyukhovskiy commented 2 years ago

Thank you for links! I started learning docs about consul but sill don't have clear picture. Should I start consul server on some dedicated server and put in sidecars configuration (hostname and ip of that counsel server along with component: "consul") ?

apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
  name: appconfig
spec:
  nameResolution:
    component: "consul"
    configuration:
      client:
        address: "MyConsulServerHostName:MyConsulServerPort"
markheath commented 2 years ago

Afraid I'm not the best person to ask about Consul as I've never used it (apart from a very quick experiment once). Maybe see if you can find a Dapr quickstart that uses it, or ask on the Dapr Discord server

AlexanderKapelyukhovskiy commented 2 years ago

Thank you Mark! Will ask in Discord.