---
title: Performance Impact of Custom Logging
description: Does Custom Logging impact integration performance? Learn about asynchronous logging, batching, and performance best practices.
---

# Does Custom Logging impact integration performance?

**Properly implemented [Custom Logging][Custom Logging Overview] has minimal performance impact (<5ms overhead)**—asynchronous logging to intermediate storage decouples log writes from integration processing, preventing latency and throughput degradation.

## Performance with Asynchronous Logging (Recommended)

### <i class="fal fa-circle-check" aria-hidden="true"></i> Minimal Overhead (<5ms)

**Asynchronous logging architecture:**

1. Integration code writes [JSON Log Event][] to **in-memory queue** (<1ms)
2. Background thread writes to intermediate storage (queue/file/database) (2-4ms, non-blocking)
3. [Pickup Service][] asynchronously fetches logs (zero impact on integration)

**Result:** Integration processing continues immediately—no waiting for network calls, disk I/O, or <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> HTTP responses.

**Example throughput:**

* **Without logging:** 1,000 orders/minute
* **With async Custom Logging:** 995 orders/minute (0.5% impact)

### <i class="fal fa-circle-check" aria-hidden="true"></i> No Network Latency

Integration doesn't call <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Web API][] directly—writes to local/nearby storage (file share, Azure queue in same region, local database).

**Network call latency avoided:** 50-200ms per log event.

### <i class="fal fa-circle-check" aria-hidden="true"></i> Handles Burst Traffic

During high-volume periods (10,000 orders/hour), logs queue up in intermediate storage—Pickup Service ingests at controlled rate without overwhelming <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> or blocking integrations.

## Performance with Synchronous Logging (Not Recommended)

### <i class="fal fa-triangle-exclamation" aria-hidden="true"></i> Significant Overhead (50-200ms per log)

**Synchronous logging (calling [Log API][] directly):**

1. Integration code calls <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> HTTP API
2. Waits for HTTP response (50-200ms network + processing time)
3. Integration resumes processing

**Result:** 50-200ms added to every integration transaction.

**Example throughput:**

* **Without logging:** 1,000 orders/minute
* **With sync Custom Logging:** 400 orders/minute (60% degradation)

### <i class="fal fa-triangle-exclamation" aria-hidden="true"></i> Failures Block Integration

If <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Web Server is unavailable (maintenance, network issues), synchronous log calls fail—integration must handle errors, retry, or lose logs.

**Not recommended for production.**

## Optimizing Performance

### Use Asynchronous Appenders

**Log4Net asynchronous appender:**

```xml
<appender name="AsyncForwardingAppender" type="log4net.Appender.AsyncForwardingAppender">
  <appender-ref ref="NodiniteFileAppender" />
  <bufferSize value="128" />
  <fix value="All" />
</appender>
```

**Serilog async writing:**

```csharp
.WriteTo.Async(a => a.AzureServiceBus(...))
```

**Benefit:** Log calls return in <1ms, background threads handle I/O.

### Batch Log Writes

**Serilog batching:**

```csharp
.WriteTo.AzureServiceBus(
    connectionString: "...",
    queueName: "nodinite-logs",
    batchPostingLimit: 50,
    period: TimeSpan.FromSeconds(5))
```

**Benefit:** 50 log events sent in single batch instead of 50 individual writes—reduces overhead.

### Write to Fast Storage

**Storage performance comparison:**

|**Storage Type**|**Write Latency**|**Recommendation**|  
|---|---|---|  
|<i class="fal fa-memory" aria-hidden="true"></i> **In-memory queue**|<1ms|✅ Best (combined with background flush)|  
|<i class="fal fa-hard-drive" aria-hidden="true"></i> **Local SSD file**|1-3ms|✅ Excellent for on-premises|  
|<i class="fal fa-inbox" aria-hidden="true"></i> [Azure Service Bus][Pickup ServiceBusQueue]|3-8ms|✅ Excellent for cloud|  
|<i class="fal fa-folder" aria-hidden="true"></i> [Network file share][Pickup Folder]|5-15ms|✅ Good (ensure low-latency network)|  
|<i class="fal fa-database" aria-hidden="true"></i> [Database INSERT][Pickup SQLServer]|10-30ms|✅ Good (use async commits)|  
|<i class="fal fa-globe" aria-hidden="true"></i> HTTP call to [Log API][]|50-200ms|⚠️ Not recommended (synchronous)|  

**Choose fast storage in same datacenter/region as integration.**

### Filter Low-Value Logs

Don't log every trivial event—focus on business-valuable logs:

* ✅ **Log:** Order received, payment processed, shipment created, errors, failures
* ❌ **Don't log:** Health check pings, internal retry attempts (unless failed), debug traces in production

**Benefit:** Reduced log volume = lower overhead, faster search, lower costs.

## Real-World Performance Examples

### Financial Services Company

**Environment:** 20 custom .NET microservices, 500K API calls/day

* **Before Custom Logging:** 1,200 requests/second average throughput
* **After Async Custom Logging ([Serilog][] → [Azure Service Bus][Pickup ServiceBusQueue]):** 1,190 requests/second average throughput
* **Impact:** 0.8% degradation, <5ms overhead per request

**Acceptable trade-off for business intelligence value.**

### E-Commerce Company

**Environment:** Node.js integrations processing 100K orders/day

* **Attempted Synchronous Logging (direct Log API calls):** 40% throughput drop, 200ms added per order
* **Switched to Async Logging (Winston → file share → Pickup Service):** <1% impact, 3ms overhead per order

**Async logging essential for performance.**

## Monitoring Performance Impact

**Metrics to track:**

* <i class="fal fa-gauge" aria-hidden="true"></i> **Integration throughput** - Messages/orders/transactions per minute (before vs after logging)
* <i class="fal fa-stopwatch" aria-hidden="true"></i> **Processing latency** - End-to-end transaction time (P50, P95, P99 percentiles)
* <i class="fal fa-hashtag" aria-hidden="true"></i> **Appender buffer size** - If async buffers fill up, investigate (increase buffer or reduce log volume)
* <i class="fal fa-clock" aria-hidden="true"></i> **Pickup Service lag** - If intermediate storage accumulates backlog, scale Pickup Service or reduce log volume

**Acceptable impact:** <5% throughput degradation, <10ms P95 latency increase.

---

**Related Topics:**  
[Asynchronous Logging Architecture][]  
[Pickup Service Configuration][]  
[Intermediate Storage Options][]  

**See all FAQs:** [Troubleshooting Overview][]

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

<i class="fal fa-book" aria-hidden="true"></i> [Back to Custom Logging Overview][Custom Logging Overview]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-question-circle" aria-hidden="true"></i> [Troubleshooting Overview][Troubleshooting]  

[Asynchronous Logging Architecture]:https://docs.nodinite.com/core-services/log-api/features/asynchronous-logging/
[Custom Logging Overview]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/overview/
[Intermediate Storage Options]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/storage-options/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Pickup Folder]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/features/configurations/folder/
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[Pickup Service Configuration]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/getting-started/configuration/
[Pickup ServiceBusQueue]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/features/configurations/servicebusqueue/
[Pickup SQLServer]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/features/configurations/sqlserver/
[Serilog]:https://docs.nodinite.com/logging-and-monitoring/serilog/overview/
[Troubleshooting]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/overview/
[Troubleshooting Overview]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/overview/
[Web API]:https://docs.nodinite.com/core-services/web-api/overview/