Skip to main content

netsuite-consumer

Overview

  • Namespace: netsuite-consumer
  • Purpose: NetSuite ERP Integration Consumers - PRODUCTION
  • Age: ~4 years (since February 2021)
  • Status: x Mostly Deprecated - Only 2 of 11 deployments active
  • Workloads: 11 deployments (2 active, 9 scaled to 0)
  • Environment: PRODUCTION - NetSuite ERP data synchronization

Architecture

NetSuite integration consumers handle data synchronization between the medical platform and NetSuite ERP:

  • Active Consumers: Test master data synchronization (2 deployments)
  • Deprecated Consumers: Orders, pricing, inventory, promotions (9 deployments scaled to 0)
  • No Auto-scaling: No HPAs or KEDA configuration
  • No Services: No exposed services (pure consumer namespace)

Auto-Scaling Configuration

No Auto-Scaling Configured:

  • No HorizontalPodAutoscalers (HPAs)
  • No KEDA scaled objects
  • Fixed replica counts (1 for active, 0 for deprecated)

Workload Categories

Active Consumers (2 deployments)

NameReplicasStatusPurpose
netsuite-consumer-test-master-group1/1RunningTest group master data sync
netsuite-consumer-test-master-investigation1/1RunningTest investigation master data sync

Deprecated Consumers (9 deployments - ALL SCALED TO 0)

x CRITICAL CLEANUP OPPORTUNITY: 82% of deployments inactive for years

NameReplicasAgeLast ActiveCategory
ds-ns-consumer-orders0/04y269d~3 years agoData Streaming - Orders
ds-ns-consumer-pricelist0/04y269d~4 years agoData Streaming - Pricing
ds-ns-consumer-testresult0/04y269d~3 years agoData Streaming - Test Results
netsuite-consumer-inventory-consumption-report0/04y270d~4 years agoInventory - Consumption
netsuite-consumer-inventory-product-master0/04y270d~4 years agoInventory - Products
netsuite-consumer-inventory-stock-out0/04y270d~4 years agoInventory - Stock
netsuite-consumer-ot-record0/04y4d~4 years agoOT Records
netsuite-consumer-promotion0/04y270d~2 years agoPromotions
netsuite-consumer-status-attune0/04y4d~2 years agoAttune Device Status

Services

No Services: This is a pure consumer namespace with no exposed services.

Access & Management

View all resources:

kubectl get all -n netsuite-consumer

Check active consumers:

# View only active consumers
kubectl get pods -n netsuite-consumer

# Check test master consumers
kubectl logs -f deployment/netsuite-consumer-test-master-group -n netsuite-consumer
kubectl logs -f deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer

View scaled-to-0 deployments:

# List all scaled-to-0 deployments
kubectl get deployments -n netsuite-consumer | grep "0/0"

# Count scaled-to-0 deployments
kubectl get deployments -n netsuite-consumer | grep -c "0/0"
# Output: 9 (out of 11 total)

Cleanup commands:

# x ONLY RUN AFTER CONFIRMING WITH TEAM

# List deployments to be removed
echo "Deployments to potentially remove:"
kubectl get deployments -n netsuite-consumer | grep "0/0" | awk '{print $1}'

# Delete scaled-to-0 deployments (DANGEROUS - confirm first!)
# kubectl delete deployment ds-ns-consumer-orders -n netsuite-consumer
# kubectl delete deployment ds-ns-consumer-pricelist -n netsuite-consumer
# ... etc for each deprecated deployment

Restart active consumers:

# Restart test master consumers
kubectl rollout restart deployment/netsuite-consumer-test-master-group -n netsuite-consumer
kubectl rollout restart deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer

Monitoring

Resource usage:

# Active pods only (2 pods)
kubectl top pods -n netsuite-consumer

Deployment status:

# All deployments
kubectl get deployments -n netsuite-consumer

# Active only
kubectl get deployments -n netsuite-consumer | grep -v "0/0"

Events:

kubectl get events -n netsuite-consumer --sort-by='.lastTimestamp' | head -20

Pod age and restarts:

# Check pod age and restart count
kubectl get pods -n netsuite-consumer -o wide

Data Flow

NetSuite ERP (External)

Message Queue (Kafka/Redpanda)

Active Consumers (2)
├─ Test Master Group
└─ Test Master Investigation

Medical Platform Database

Test Master Data Available

Deprecated Data Flows (No longer active)

 Orders Sync (ds-ns-consumer-orders)
Price List Sync (ds-ns-consumer-pricelist)
Test Results Sync (ds-ns-consumer-testresult)
Inventory Sync (3 consumers)
Promotions Sync (netsuite-consumer-promotion)
Device Status Sync (netsuite-consumer-status-attune)

NetSuite Integration

Active Integration: Test Master Data

Purpose: Synchronize test catalog and investigation data from NetSuite ERP

  1. Test Master Group Sync:

    • Test group definitions
    • Test categories
    • Group relationships
    • netsuite-consumer-test-master-group processes events
  2. Test Master Investigation Sync:

    • Investigation test definitions
    • Test parameters
    • Investigation profiles
    • netsuite-consumer-test-master-investigation processes events

Deprecated Integrations

All deprecated integrations have been replaced by other systems or discontinued:

  1. Data Streaming Consumers (ds-ns-consumer-*):

    • Orders, price lists, test results
    • Likely replaced by direct API integration or different architecture
  2. Inventory Sync:

    • Consumption reports, product master, stock management
    • Possibly moved to different integration approach
  3. Promotions & Device Status:

    • No longer syncing via NetSuite
    • Managed by different systems

Production Considerations

High Availability

x Limited HA:

  • Only 2 active consumers, both at 1 replica
  • No redundancy for test master data sync
  • Single point of failure for each consumer

Current State

  • Active: 2 consumers processing test master data
  • Deprecated: 9 consumers inactive for years
  • Load: Very low (only 2 pods running)
  • Criticality: Low to Medium (test master data important but not real-time critical)

Recommendations

  1. URGENT: Resource Cleanup:

    • 9 deployments (82%) scaled to 0 for years
    • This is the largest cleanup opportunity in the namespace
    • Action plan:
      • Confirm with team that these are permanently deprecated
      • Document the decision
      • Delete deprecated deployments to clean up namespace
      • Remove from deployment pipelines
  2. Consumer Resilience:

    • Both active consumers at 1 replica
    • Consider 2 replicas for HA:
      • netsuite-consumer-test-master-group
      • netsuite-consumer-test-master-investigation
  3. Consider Auto-scaling:

    • No KEDA configured
    • If message volumes increase, add KEDA for queue-based scaling
    • Currently low volume doesn't justify KEDA overhead
  4. Monitoring Improvements:

    • Add health checks for NetSuite connectivity
    • Monitor sync lag for test master data
    • Alert on consumer failures (critical for test catalog)
  5. Documentation:

    • Document why other integrations were deprecated
    • Maintain history for reference
    • Update integration architecture docs

Troubleshooting

Active consumer issues:

# Check test master group consumer
kubectl logs -f deployment/netsuite-consumer-test-master-group -n netsuite-consumer

# Check test master investigation consumer
kubectl logs -f deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer

# Check for errors in last 100 lines
kubectl logs deployment/netsuite-consumer-test-master-group -n netsuite-consumer --tail=100 | grep -i error

# Check pod restarts
kubectl get pods -n netsuite-consumer -o wide
# Note: test-master-investigation has 1 restart (86 days ago)

# Restart consumers if needed
kubectl rollout restart deployment/netsuite-consumer-test-master-group -n netsuite-consumer
kubectl rollout restart deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer

NetSuite connectivity issues:

# Check consumer logs for connection errors
kubectl logs deployment/netsuite-consumer-test-master-group -n netsuite-consumer | grep -i "connection\|timeout\|refused"

# Check if consuming messages
kubectl logs deployment/netsuite-consumer-test-master-group -n netsuite-consumer --tail=50

# Verify Kafka connectivity (if using Kafka)
kubectl exec -it deployment/netsuite-consumer-test-master-group -n netsuite-consumer -- env | grep KAFKA

Sync lag investigation:

# Monitor consumer processing
kubectl logs -f deployment/netsuite-consumer-test-master-group -n netsuite-consumer | grep -i "processed\|consumed"

# Check if stuck
kubectl get pods -n netsuite-consumer -o wide
# Look for old pod age or high restart count

Investigating scaled-to-0 deployments:

# View deployment history
kubectl rollout history deployment/ds-ns-consumer-orders -n netsuite-consumer

# Check deployment configuration
kubectl get deployment ds-ns-consumer-orders -n netsuite-consumer -o yaml

# View when last scaled to 0
kubectl describe deployment ds-ns-consumer-orders -n netsuite-consumer | grep -A 10 "Events:"

Performance Metrics

Current Scale

  • Active Consumers: 2 deployments, 2 pods total
  • Deprecated: 9 deployments, 0 pods
  • Resource Usage: Very low (only 2 pods)
  • Pod Age: 381 days (very stable, no recent restarts except 1)

Historical Context

This namespace has been dramatically downsized over the past 4 years:

  • Original: 11 active integrations
  • Current: 2 active integrations
  • Reduction: 82% of consumers deprecated
  • Reason: Likely architectural changes, direct API integration, or feature deprecation

Integration Points

External Systems

  1. NetSuite ERP:

    • Cloud-based ERP system
    • Source of test master data
    • Likely API-based or file-based integration
  2. Test Catalog:

    • Receives test group definitions
    • Receives investigation profiles
    • Used by ordering and booking systems

Internal Systems

  • Test Master Database: Stores synchronized test definitions
  • Booking System: Uses test master data for test selection
  • POS System: Uses test master data for pricing and ordering

Important Notes

x PRODUCTION ENVIRONMENT:

  • Only 2 active consumers out of 11 deployments
  • Test master data is important for test catalog accuracy
  • Changes should be coordinated with ERP team
  • Low risk due to small footprint

x MASSIVE CLEANUP OPPORTUNITY:

  • 9 deployments (82%) scaled to 0 for years
  • Largest cleanup opportunity across all documented namespaces
  • Removing these would:
    • Simplify namespace management
    • Reduce deployment pipeline complexity
    • Clean up monitoring dashboards
    • Improve deployment list readability
  • Action Required: Coordinate with team to delete permanently

x No Redundancy:

  • Both active consumers at 1 replica
  • Single point of failure for each
  • Consider increasing to 2 replicas for HA

System Purpose

NetSuite Consumer namespace serves as:

  1. Test Master Data Sync: Synchronize test catalog from NetSuite ERP (active)
  2. Deprecated Integrations: Historical integrations no longer in use (9 scaled to 0)
  3. Legacy Namespace: Majority of original functionality moved elsewhere

Key Role: Minimal active integration for test master data synchronization with NetSuite ERP. Primarily a legacy namespace with significant cleanup needed.

Cleanup Checklist

Before removing scaled-to-0 deployments, verify:

  • Confirm with ERP integration team
  • Confirm with infrastructure team
  • Verify no re-activation plans
  • Check deployment pipelines
  • Update architecture documentation
  • Remove from monitoring dashboards
  • Delete deployments:
    • ds-ns-consumer-orders
    • ds-ns-consumer-pricelist
    • ds-ns-consumer-testresult
    • netsuite-consumer-inventory-consumption-report
    • netsuite-consumer-inventory-product-master
    • netsuite-consumer-inventory-stock-out
    • netsuite-consumer-ot-record
    • netsuite-consumer-promotion
    • netsuite-consumer-status-attune