Skip to main content

rfd--mixpanel-integration

Overview

  • Namespace: rfd--mixpanel-integration
  • Purpose: Referring Doctor Mixpanel Analytics Integration - PRODUCTION
  • Age: ~2 years 256 days (since February 2023)
  • Status: COMPLETELY INACTIVE - All deployments scaled to 0
  • Workloads: 6 deployments (100% scaled to 0)
  • Environment: PRODUCTION - Analytics integration (INACTIVE)

Architecture

Mixpanel analytics integration system - COMPLETELY SCALED TO 0:

  • Main Application: REST API backend - Scaled to 0/0
  • Event Consumers: Doctor KYC, statement links, test results, login, mixpanel events - All Scaled to 0/0

Auto-Scaling Configuration

No Auto-Scaling Configured:

  • No HorizontalPodAutoscalers (HPAs)
  • No KEDA scaled objects
  • All deployments scaled to 0

Workload Categories

Main Application (1 deployment - Scaled to 0)

NameReplicasStatusPurpose
rfd--mixpanel-integration--be--app--prod0/0Scaled to 0Mixpanel API (INACTIVE)

Event Consumers (5 deployments - ALL Scaled to 0)

NameReplicasStatusPurpose
consumer-doctor-kyc-register0/0Scaled to 0Doctor KYC events (INACTIVE)
consumer-doctor-statement-link-event0/0Scaled to 0Statement link tracking (INACTIVE)
consumer-doctor-test-result0/0Scaled to 0Test result events (INACTIVE)
consumer-login-event0/0Scaled to 0Login tracking (INACTIVE)
consumer-rfd-mixpanel-event0/0Scaled to 0General mixpanel events (INACTIVE)

Services

NameTypeCluster IPPortsNodePortPurpose
rfd--mixpanel-integration--be--app--prodNodePort10.8.26.2118030512Mixpanel API (NO BACKEND!)

Access & Management

View all resources:

kubectl get all -n rfd--mixpanel-integration

Check scaled-to-0 deployments:

# View all deployments
kubectl get deployments -n rfd--mixpanel-integration

# All should show 0/0
kubectl get deployments -n rfd--mixpanel-integration | grep "0/0"

Scale up if needed (for testing):

# Scale up main app
kubectl scale deployment rfd--mixpanel-integration--be--app--prod -n rfd--mixpanel-integration --replicas=1

# Scale up specific consumer
kubectl scale deployment rfd--mixpanel-integration--be--consumer-login-event--prod -n rfd--mixpanel-integration --replicas=1

# Scale up all consumers
kubectl get deployments -n rfd--mixpanel-integration | grep consumer | awk '{print $1}' | xargs -I {} kubectl scale deployment/{} -n rfd--mixpanel-integration --replicas=1

Monitoring

Deployment status:

# All deployments (will show 0/0)
kubectl get deployments -n rfd--mixpanel-integration

# Deployment history
kubectl rollout history deployment -n rfd--mixpanel-integration

Events:

kubectl get events -n rfd--mixpanel-integration --sort-by='.lastTimestamp' | head -20

Data Flow (CURRENTLY INACTIVE)

Mixpanel Analytics Event

rfd--mixpanel-integration--be--app--prod (NodePort 30512)

NO BACKEND PODS (scaled to 0)

Message Queue (Kafka/Redpanda)

ALL CONSUMERS SCALED TO 0
├─ Doctor KYC → consumer-doctor-kyc-register (0/0)
├─ Statement Links → consumer-doctor-statement-link-event (0/0)
├─ Test Results → consumer-doctor-test-result (0/0)
├─ Login Events → consumer-login-event (0/0)
└─ Mixpanel Events → consumer-rfd-mixpanel-event (0/0)

NO ANALYTICS EVENTS BEING PROCESSED

Mixpanel Integration Workflow (INACTIVE)

1. Mixpanel API (Scaled to 0)

  • INACTIVE - scaled to 0
  • Previously handled Mixpanel integration API
  • Event collection and forwarding
  • Analytics data processing

2. Doctor KYC Event Tracking (Scaled to 0)

  • INACTIVE - scaled to 0
  • Previously tracked doctor registration analytics
  • KYC completion metrics
  • Verification funnel analytics
  • INACTIVE - scaled to 0
  • Previously tracked statement access
  • Link click analytics
  • Document view metrics

4. Test Result Event Tracking (Scaled to 0)

  • INACTIVE - scaled to 0
  • Previously tracked test result views
  • Doctor engagement metrics
  • Result notification analytics

5. Login Event Tracking (Scaled to 0)

  • INACTIVE - scaled to 0
  • Previously tracked doctor logins
  • Session analytics
  • User engagement metrics

6. General Mixpanel Events (Scaled to 0)

  • INACTIVE - scaled to 0
  • Previously processed general analytics events
  • Custom event tracking
  • User behavior analytics

Production Considerations

Cleanup Opportunity

100% of deployments scaled to 0 - LARGEST CLEANUP OPPORTUNITY:

  • Main API: Scaled to 0
  • ALL 5 consumers: Scaled to 0
  • Service exists but no backend
  • Namespace age: ~2 years (likely permanently unused)

Recommendations

  1. Investigate Mixpanel Integration Status:

    • Is Mixpanel still being used?
    • Was integration moved elsewhere?
    • Is there a replacement analytics solution?
  2. Cleanup Checklist:

    • Confirm with RFD team that Mixpanel is no longer used
    • Confirm with product/analytics team
    • Check if events are being sent elsewhere
    • Verify no plans to reactivate
    • Remove all 6 deployments if confirmed unused
    • Remove service
    • Consider removing entire namespace
    • Update architecture documentation
  3. If Still Needed:

    • Scale up deployments
    • Add monitoring and alerting
    • Consider auto-scaling
    • Document why it was scaled to 0
  4. Impact Assessment:

    • Has been scaled to 0 for a long time (~2 years of replicasets)
    • No active pods = no analytics data flowing
    • Likely no impact if removed
    • Verify with stakeholders

Troubleshooting

Investigation steps:

# Check deployment history
for deploy in $(kubectl get deployments -n rfd--mixpanel-integration -o name); do
echo "=== $deploy ==="
kubectl rollout history $deploy -n rfd--mixpanel-integration | head -5
done

# Check when scaled to 0
kubectl describe deployments -n rfd--mixpanel-integration | grep -A 5 "Replicas:"

# Check service (will route to nothing)
kubectl describe service rfd--mixpanel-integration--be--app--prod -n rfd--mixpanel-integration

Scale up for testing:

# Scale up main app
kubectl scale deployment rfd--mixpanel-integration--be--app--prod -n rfd--mixpanel-integration --replicas=1

# Watch startup
kubectl get pods -n rfd--mixpanel-integration -w

# Check logs once started
kubectl logs deployment/rfd--mixpanel-integration--be--app--prod -n rfd--mixpanel-integration

# Scale back down
kubectl scale deployment rfd--mixpanel-integration--be--app--prod -n rfd--mixpanel-integration --replicas=0

Cleanup if unused:

# Delete all deployments
kubectl delete deployments --all -n rfd--mixpanel-integration

# Delete service
kubectl delete service rfd--mixpanel-integration--be--app--prod -n rfd--mixpanel-integration

# Delete namespace (if completely unused)
kubectl delete namespace rfd--mixpanel-integration

Performance Metrics

Current Scale

  • Main API: 0 replicas (scaled to 0)
  • All Consumers: 0 replicas (scaled to 0)
  • Total Active Pods: 0 pods
  • Scaled to 0: 100% of deployments (6 of 6)

Stability

  • Namespace Age: ~2 years (very mature)
  • Last Activity: Multiple replicasets from ~2 years ago
  • Status: Completely inactive for extended period
  • Cleanup Priority: HIGHEST (100% scaled to 0)

CLEANUP REQUIRED

This namespace appears to be completely unused:

  • Step 1: Confirm with RFD team that Mixpanel integration is no longer needed
  • Step 2: Confirm with product/analytics team
  • Step 3: Verify analytics data is being collected elsewhere (or not needed)
  • Step 4: Remove all deployments and service
  • Step 5: Consider removing entire namespace
  • Step 6: Update architecture and integration documentation

100% of deployments scaled to 0 for ~2 years suggests this integration is permanently deprecated.