Skip to content
View feli6's full-sized avatar
Block or Report

Block or report feli6

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned

  1. kafka-consumer-lag-reporter kafka-consumer-lag-reporter Public

    A standalone spring boot app for reporting kafka consumer group lag metrics to prometheus

    Kotlin 1

  2. kotlin-spring-app kotlin-spring-app Public

    Spring boot app using kotlin

    Kotlin

  3. Postgres Useful queries Postgres Useful queries
    1
    Size of all relations:
    2
    SELECT nspname || '.' || relname AS "relation",
    3
           pg_size_pretty(pg_relation_size(C.oid)) AS "size"
    4
    FROM pg_class C
    5
           LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
  4. Postgress autovacuum tuning Postgress autovacuum tuning
    1
    autovacuum_vacuum_cost_limit
    2
    default = 200
    3
    proposed=2000
    4
    #To prevent excessive load on the DB due to the autovacuum, there is an I/O quota imposed by Postgres. So every read/write causes depletion of this quota and once it is exhausted the autovacuum sleeps for a fixed time. This configuration increases the quota limit, therefore increasing the amount of I/O that the vacuum can do. This has a default of 200. More details in references #7
    5
    What we generally do is increasing the cost_limit parameter, e.g. to 1000 (or 2000), which increases the throughput by 5x (or 10x). You may of course tweak the other parameters (cost per page operation, sleep delay), but we do that only very rarely – changing the cost limit works well enough.
  5. Kube commands Kube commands
    1
    Change log level on a pod running spring boot app:
    2
    
                  
    3
    kubectl exec pod-id   -- curl -X POST -d '{"configuredLevel":"TRACE"}' -H "Content-Type: application/json" http://localhost:8080/actuator/loggers/org.springframework
    4
    
                  
    5
    Change log level on multiple pods
  6. Kafka commands Kafka commands
    1
    Cosole consumer: 
    2
    bin/kafka-console-consumer.sh --bootstrap-server broker1:9092 --topic topic-name --from-beginning
    3
     
    4
     
    5
    With timestamp