Giter Site home page Giter Site logo

Comments (8)

JorTurFer avatar JorTurFer commented on July 17, 2024

Hello,
Could you share your HTTPScaledObject and the add-on operator logs?

from http-add-on.

hovhannescognaize avatar hovhannescognaize commented on July 17, 2024

Yes, this is my config for httpscaledobject:

kind: HTTPScaledObject
apiVersion: http.keda.sh/v1alpha1
metadata:
    name: cognaize-txt-service
    annotations:
        httpscaledobject.keda.sh/skip-scaledobject-creation: "false"
spec:
    hosts:
    - examplesmth.net
    scaleTargetRef:
        name: sda
        kind: Deployment
        apiVersion: apps/v1
        service: sda
        port: 80
    replicas:
        min: 1
        max: 10
    scaledownPeriod: 300
    scalingMetric: # requestRate and concurrency are mutually exclusive
        requestRate:
            granularity: 1s
            targetValue: 100
            window: 1m
        concurrency:
            targetValue: 100

And this is logs for external scaler:

2024-05-17T18:56:37Z	INFO	Scaler Version: 0.8.0
2024-05-17T18:56:37Z	INFO	setup	starting the grpc server
2024-05-17T18:56:37Z	INFO	setup	starting the queue pinger
2024-05-17T18:56:37Z	INFO	setup	starting the httpso informer
2024-05-17T18:56:37Z	INFO	setup	starting the endpoints informer
2024-05-17T18:56:37Z	INFO	starting grpc server	{"address": "0.0.0.0:9090"}
2024-05-17T18:56:37Z	INFO	starting healthchecks loop
2024-05-17T18:56:37Z	INFO	Scaler Commit: 1c9f7348b8d481ae044f2ec58627cba1ce859b8c
2024-05-17T18:56:37Z	INFO	Go Version: go1.22.2
2024-05-17T18:56:37Z	INFO	Go OS/Arch: linux/amd64

Logs of keda operator:

2024/05/17 18:51:20 maxprocs: Updating GOMAXPROCS=1: determined from CPU quota
2024-05-17T18:51:21Z	INFO	setup	Starting manager
2024-05-17T18:51:21Z	INFO	setup	KEDA Version: 2.14.0
2024-05-17T18:51:21Z	INFO	setup	Git Commit: 6681d5ecbc82293626cab693625c9cc9fb453381
2024-05-17T18:51:21Z	INFO	setup	Go Version: go1.21.9
2024-05-17T18:51:21Z	INFO	setup	Go OS/Arch: linux/amd64
2024-05-17T18:51:21Z	INFO	setup	Running on Kubernetes 1.28	{"version": "v1.28.7-gke.1026000"}
2024-05-17T18:51:21Z	INFO	starting server	{"kind": "health probe", "addr": "[::]:8081"}
I0517 18:51:21.163194       1 leaderelection.go:250] attempting to acquire leader lease keda/operator.keda.sh...
I0517 18:51:57.078259       1 leaderelection.go:260] successfully acquired lease keda/operator.keda.sh
2024-05-17T18:51:57Z	INFO	Starting EventSource	{"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "source": "kind source: *v1alpha1.ScaledObject"}
2024-05-17T18:51:57Z	INFO	Starting EventSource	{"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "source": "kind source: *v2.HorizontalPodAutoscaler"}
2024-05-17T18:51:57Z	INFO	Starting Controller	{"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject"}
2024-05-17T18:51:57Z	INFO	Starting EventSource	{"controller": "triggerauthentication", "controllerGroup": "keda.sh", "controllerKind": "TriggerAuthentication", "source": "kind source: *v1alpha1.TriggerAuthentication"}
2024-05-17T18:51:57Z	INFO	Starting Controller	{"controller": "triggerauthentication", "controllerGroup": "keda.sh", "controllerKind": "TriggerAuthentication"}
2024-05-17T18:51:57Z	INFO	Starting EventSource	{"controller": "scaledjob", "controllerGroup": "keda.sh", "controllerKind": "ScaledJob", "source": "kind source: *v1alpha1.ScaledJob"}
2024-05-17T18:51:57Z	INFO	Starting Controller	{"controller": "scaledjob", "controllerGroup": "keda.sh", "controllerKind": "ScaledJob"}

from http-add-on.

JorTurFer avatar JorTurFer commented on July 17, 2024

I need the logs of the add-on operator (HTTP Add-on operator), not KEDA operator logs (there are 2 operators, KEDA's one and the Add-on one).
I expect errors on the add-on logs because the HTTPScaledObject is defining both, requestRate and concurrency, and they are mutually exclusive:

      scalingMetric: # requestRate and concurrency are mutually exclusive
        requestRate:
            granularity: 1s
            targetValue: 100
            window: 1m
        concurrency:
            targetValue: 100

from http-add-on.

hovhannescognaize avatar hovhannescognaize commented on July 17, 2024

Thank you very much, I didn't had a close look at that part that it should be only one either requestRate or concurrency.

One question just, I want to scale based on request count so every time when there is request I want to trigger pod scale up, will this configuration work at that way?

scalingMetric: # requestRate and concurrency are mutually exclusive
        concurrency:
            targetValue: 1

from http-add-on.

JorTurFer avatar JorTurFer commented on July 17, 2024

If you don't have a continuous amount of traffic (> 1-2krmp), I'd use requestRate:

      scalingMetric:
        requestRate:
            granularity: 1s
            targetValue: 100 # 100 request per second
            window: 1m

from http-add-on.

hovhannescognaize avatar hovhannescognaize commented on July 17, 2024

When I have changed from this:

scalingMetric:
     concurrency:
          targetValue: 1

to this:

scalingMetric:
    requestRate:
        granularity: 1s
        targetValue: 1 # 1 request per second
        window: 1m

It didn't created new ScaledObject, is that expected?

from http-add-on.

JorTurFer avatar JorTurFer commented on July 17, 2024

The ScaledObject doesn't change due to this change because in v0.8.0 we introduced a change in how both items are connected, instead of updating the ScaledObject with more new info, we just reference the HTTPScaledObject in the ScaledObject (if you check the metadata section, the only fields are the external scaler address and the HTTPScaledObject name).

All the changes are applied on the add-on components side (but you should still have the ScaledObject created before)

from http-add-on.

hovhannescognaize avatar hovhannescognaize commented on July 17, 2024

Got it, thank you very much

from http-add-on.

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.