Performance
Prefer bulk endpoints (/tokenize/bulk, /detokenize/bulk, or the SDK bulk helpers). One bulk call of many fields is far cheaper than the same number of single calls, both in latency and in rate-limit budget.
How Veilio behaves under load, what to expect for latency, and how to size an integration (HTTP, SDK, Gateway).
What “fast enough” means here
Veilio sits on the write/read path for sensitive fields. Clients care about three things:
- Latency of one call (user waits on a form save or a reveal)
- Throughput of many fields (import, list screens, gateway SQL batches)
- Predictable ceilings (rate limits, bulk size) so capacity planning is honest
Tokenization is cryptographic work plus a durable write in the vault. It is not a cache hit. Prefer bulk and Gateway batching over hundreds of single-field round-trips.
Hard limits
| Limit | Value | Why it matters |
|---|---|---|
| Fields / tokens per bulk request | 1 000 | Split larger jobs client-side or let the Gateway do it |
| Rate limit per API key (tokenize / detokenize / lookup) | 1 000 HTTP calls / minute | One bulk of 1 000 fields = 1 call and 1 000 request units on quotas |
| Shred / shred-bulk per API key | 100 HTTP calls / minute | Up to 1 000 tokens per shred-bulk call |
| Gateway default batching | 1 000 fields/call, 4 calls in flight, 30 s timeout (VEILIO_TIMEOUT_MS) | Fewer round-trips for large list screens and imports |
| SDK / HTTP timeout (typical) | 30 s | Raise only if your network path is slow; do not hide a stuck dependency |
Dashboard quotas count request units (1 bulk field = N units). Rate limits count HTTP calls. They are different meters on purpose.
Integration patterns
| Path | Typical use | Cost model |
|---|---|---|
HTTP single POST /tokenize | One field on form submit | 1 RTT + vault write |
HTTP bulk POST /tokenize/bulk | Imports, multi-field forms | 1 RTT for up to 1 000 fields (best €/ms) |
| SDK JS / Python | Same as HTTP with retries | Same network cost as HTTP; SDK overhead is negligible vs RTT |
| Gateway (library or SQL) | Screens stay clear, DB stores masks/tok_… | Same Veilio API under the hood + local SQL rewrite. Cache/relay (when enabled) avoids repeat reveals for the same screen |
Rule of thumb for imports: always bulk. One thousand single tokenize calls burn the rate-limit budget and multiply latency by ~1 000.
SaaS results · detailed campaign (HTTP + SDK)
Measured against https://app.veilio.fr/api, Veilio SaaS 3.0.3.
| Scenario | n | p50 (ms) | p95 (ms) | mean (ms) | Notes |
|---|---|---|---|---|---|
| HTTP tokenize (1 field) | 25 | 238 | 329 | 249 | |
| HTTP detokenize (1 token) | 25 | 201 | 225 | 204 | |
| HTTP tokenize bulk (10) | 8 | 408 | 421 | 410 | ~41 ms/field at p50 |
| HTTP tokenize bulk (50) | 8 | 513 | 587 | 532 | ~10 ms/field at p50 |
| HTTP tokenize bulk (100) | 8 | 508 | 587 | 522 | ~5 ms/field at p50 |
| HTTP tokenize bulk (500) | 5 | 570 | 1022 | 693 | |
| HTTP tokenize bulk (1 000) | 5 | 1075 | 2261 | 1208 | ~1.1 ms/field at p50 |
| HTTP detokenize bulk (10) | 8 | 199 | 228 | 206 | Flat vs size |
| HTTP detokenize bulk (50) | 8 | 206 | 230 | 211 | Flat vs size |
| HTTP detokenize bulk (100) | 8 | 206 | 218 | 207 | Flat vs size |
| HTTP detokenize bulk (1 000) | 5 | 329 | 337 | 327 | |
| HTTP tokenize ×10 parallel | 5 | 1186 | 2104 | 1425 | See also Nov 3 parallel row below |
| Gateway-style tokenize (400 fields, 4×100) | 5 | 1457 | 2785 | 1592 | ~251 fields/s |
| SDK JS tokenize (1 field) | 25 | 232 | 239 | 233 | Same order as HTTP |
| SDK JS detokenize (1 token) | 25 | 204 | 222 | 206 | Same order as HTTP |
| SDK JS tokenize bulk (50) | 8 | 531 | 629 | 546 | Same order as HTTP |
| SDK JS detokenize bulk (50) | 8 | 202 | 205 | 202 | Same order as HTTP |
SaaS results · full scenario matrix (API key)
Independent re-run of the product scenario sheet against production SaaS. p50 unless noted. GET /health RTT: 20 ms.
| Scenario | Result |
|---|---|
| 1. Tokenize 1 field | 222 ms |
| 2. Detokenize 1 token | 186 ms |
| 3. Tokenize bulk 1 000 | 1.5–2.6 s |
| 3. Detokenize bulk 1 000 | 303–483 ms |
| 4. Lookup | 218 ms |
| 6. Tokenize, 10 in parallel | 20.0 calls/s, p95 524 ms |
| 6. Detokenize, 10 in parallel | 20.5 calls/s |
| 7. Dataset import 1 000 rows (API key) | 201 in 5.6 s |
| 7. Dataset download (API key / access token) | 1.1 s / 0.7 s |
| 8. Shred 1 token | 190 ms |
How to read SaaS
- A screen that reveals 10 fields with 10 single calls costs ~2 s. The same work as one
detokenize/bulkis ~0.3 s. - Prefer bulk: 1 000 emails in one call (~1.1 s p50 in the detailed suite) beats 1 000 singles.
- Detokenize bulk stays near ~200 ms from 10 to 100 tokens, and ~330 ms at 1 000 tokens in the detailed suite.
- SDK JS matches HTTP (thin client). Python SDK uses the same API.
- Latency still depends on region and path. Re-measure from your network before go-live.
On-premise results · full scenario matrix (veilio/app:3.0.3)
Measured on a dedicated Hub host (local RTT). Same protocol for every scenario. p50 unless noted.
| Scenario | Result |
|---|---|
| 1. Tokenize 1 field | 47 ms (p95 64) |
| 2. Detokenize 1 token | 41 ms |
| 3. Tokenize bulk 100 | 71–88 ms |
| 3. Tokenize bulk 1 000 | 293–383 ms |
| 3. Detokenize bulk 1 000 | 77–104 ms (one call) |
| 4. Lookup | 48 ms |
5. GET /datasets | 12 ms |
| 6. Tokenize, 10 in parallel | 38.4 calls/s, p95 363 ms |
| 6. Detokenize, 10 in parallel | 50.0 calls/s |
| 7. Dataset import 1 000 rows (API key) | 201 in 987 ms |
| 7. Dataset download 1 000 rows (API key) | 263 ms |
| 8. Shred 1 token | 20 ms |
| 8. Shred 100, 10 in parallel | 1.1 s |
| 9. Gateway INSERT, 4 protected fields | 86 ms |
| 9. Gateway list of 100 with clear fields | 124 ms |
| 9. Gateway unprotected table | ~1 ms with current Gateway (TCP_NODELAY) |
On-premise · new API key vs large API key
300 sequential tokenize calls, then 200 at 10-way parallelism, same host, same build.
| API key | Sequential p50 | Parallel throughput |
|---|---|---|
| Fresh key | 46 ms | 23 calls/s (host under load) |
| Key with ~30 000 existing tokens | 45 ms | 52 calls/s |
Tokenize cost no longer grows with the number of tokens already created on the key.
On-premise · dashboard session
Browser request timing on the Hub UI (same build).
| Scenario | Result |
|---|---|
Shred-bulk, 50 tokens (POST /tokens/shred-bulk) | 711 ms, one call (TOKEN_SHREDDED) |
| Import CSV 1 000 rows × 3 columns | 999 ms |
| Download that dataset, CSV | p50 233 ms over 10 runs (38 KB) |
| Download that dataset, JSON | p50 256 ms over 5 runs (68 KB) |
| Download large stream dataset, CSV | 3.4 s (3 MB) |
Gateway · SQL proxy scenarios
Postgres behind the Gateway, persistent psql session, \timing on the client. Policy protects email, phone, prenom, nom. Backend = on-prem Hub unless noted.
| Query | Direct DB | Gateway → on-prem Hub | Gateway → SaaS |
|---|---|---|---|
| INSERT 1 row, 4 protected fields | 0.2 ms | p50 86 ms (current) / historically ~400 ms before Hub write fix | p50 1 634 ms, p95 2 825 ms |
| SELECT 1 row by id | 0.2 ms | p50 78 ms, p95 101 ms | p50 235 ms, p95 278 ms |
| Lookup by email | - | p50 72 ms, p95 99 ms | p50 261 ms, p95 272 ms |
| List 100 rows with clear fields | 0.5 ms | p50 106–124 ms | p50 285 ms, p95 322 ms |
| List 100 rows, no protected columns | - | p50 44 ms | p50 45 ms |
| Unprotected table | 0.2 ms | ~1 ms with TCP_NODELAY | ~1 ms with TCP_NODELAY |
- List of 100 clear rows uses one bulk reveal under the hood.
- No plaintext left in the application database after protected writes.
On-prem vs SaaS
- On-prem reads are much cheaper (local network). Writes still pay vault + durable storage.
- Prefer bulk the same way on both: 1 000 fields in one call beats thousands of singles.
- SaaS single-call floor stays ~190–220 ms (network + vault). Plan UI around bulk, not N sequential reveals.
- After a burst of ~1 000 tokenize/minute you will hit the per-key rate limit (HTTP 429). That means the Hub is fast enough to reach the published ceiling.
Capacity planning checklist
- Count protected fields written per minute at peak (not total rows)
- Prefer bulk so HTTP calls ≈
ceil(fields / 1000), notfields - Keep headroom under 1 000 calls/min/key
- For Gateway multi-seat list screens, plan a reveal cache/relay or staggered refreshes
- Measure from your region (or on-prem host) before go-live; paste p95 into your runbook
What this page is not
- Not an SLA or contractual throughput guarantee
- Not a substitute for load testing your app + database + Veilio together
- Not a claim that tokenization is as cheap as a Redis
GET