Code Monkey home page Code Monkey logo

Comments (2)

ytsarev avatar ytsarev commented on May 28, 2024 2

To document the findings:

  • From DNS response perspective ohmyglb behaves exactly as described
  • Associated terratest TestOhmyglbSplitFailoverExample test proves it in automated way
  • At the same time this 'pinning' is edge case scenario because in case of healthy workload on cluster X ( default situation) X ohmyglb will return its own records and Y ohmyglb will return its own records too.
  • It will result in the rare situation when 2 ohmylgb clusters that usually working in sync and pair are returning different A records set
  • Associated Zone Delegation includes both ohmyglb clusters in its configuration and it is desired design
  • Having above in mind - assuming app A access app B through fqdn there will be no guarantee which of the clusters it will hit
  • To enable this Geo 'pinning' we will have to point app pods to @ohmyglb-coredns cluster service effectively using ohmylgb coredns as a main DNS for resolution.
  • The above can be achieved by changing forward plugin conf of main kubernetes coredns config to forward to ohmyglb one.
  • In the meantime forward of ohmyglb coredns can be adjusted to recursively query upstream dns servers for external fqdns

from k8gb.

donovanmuller avatar donovanmuller commented on May 28, 2024 1

The following scenario should be catered for:

We have two applications, A and B deployed on two clusters, X and Y.

  • Application A calls application B on cluster X (within the same cluster) through it's GLB host
  • Same for applications A and B on cluster Y
  • The Gslb resources for application B (applied on both clusters) both have their own cluster as primary. I.e. the primary cluster for application B on cluster X is X and the failover is Y and vice versa. For example:
# Applied on cluster X
apiVersion: ohmyglb.absa.oss/v1beta1
kind: Gslb
metadata:
  name: application-b-gslb
spec:
  ingress:
    rules:
      - host: b.cloud.example.com
        http:
          paths:
          - backend:
              serviceName: application-b
              servicePort: http
            path: /
  strategy:
    type: failover
    primaryGeoTag: x
---
# Applied on cluster Y
apiVersion: ohmyglb.absa.oss/v1beta1
kind: Gslb
metadata:
  name: application-b-gslb
spec:
  ingress:
    rules:
      - host: b.cloud.example.com
        http:
          paths:
          - backend:
              serviceName: application-b
              servicePort: http
            path: /
  strategy:
    type: failover
    primaryGeoTag: y

If application B becomes unhealthy on cluster X then application B on cluster Y should have it's node IPs resolved. So that application A on cluster X calls application B on the failover cluster, cluster Y.

from k8gb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.