API-taristu ja taustasüsteemide arendus

Eesti

Arhitektuurid

Viitearhitektuurid

Tehnilised kavandid, mida kasutame lähtepunktina. Igaüks näitab voogu, peamisi disainiotsuseid ja tavalise tarne sisu.

See sisu on praegu saadaval ainult inglise keeles.

High-throughput API gateway & routing

A gateway layer that authenticates, limits, validates and routes every request, with latency budgets set per route and observability built in from the first deployment.

Ulatus
Edge-to-upstream request path for public and partner APIs
Tehnoloogiad
  • Envoy
  • OAuth 2.0 / JWT
  • mTLS
  • OpenAPI
  • OpenTelemetry
  • k6
Gateway pipeline: TLS termination, authentication and authorisation, rate limiting, schema validation, routing and upstream services, with every stage emitting traces and metrics to an observability layer.

Voog

  1. TLS terminates at the edge; partner traffic presents client certificates.
  2. Tokens are verified locally against cached signing keys; scopes are mapped to routes.
  3. Per-client and per-route token buckets enforce quotas before any upstream work.
  4. Requests are validated against the OpenAPI schema and size limits.
  5. The router applies weights, timeouts and bounded retries with jitter to healthy upstreams.
  6. Each stage emits spans and RED metrics; security-relevant decisions go to an append-only audit log.

Disainiotsused

Local or remote token validation?
Local JWT verification with short-lived tokens and cached keys keeps p99 low; introspection is reserved for high-risk routes.
Where to enforce rate limits?
At the gateway with a shared counter store, so limits hold across replicas and before expensive upstream calls.
Retries
Only for idempotent methods or requests carrying an idempotency key, with a per-request retry budget to avoid amplification.

Tulemid

  • Gateway configuration as code
  • Route catalogue with p99 budgets and limits
  • Load-test scripts and report
  • Operations runbook

Real-time anomaly & abuse-filtering pipeline

A streaming pipeline that scores traffic for abuse – credential stuffing, scraping, automated sign-ups – and applies allow, challenge or block decisions. Every legitimate visitor receives the same content; the pipeline only filters abusive traffic.

Ulatus
Request and event streams for login, sign-up and high-value API routes
Tehnoloogiad
  • Kafka
  • Flink or Go consumers
  • Redis
  • PostgreSQL
  • Rules engine
  • Grafana
Abuse-filtering pipeline: events are ingested, enriched with network and device context, turned into windowed features, scored by rules and a model, and routed to allow, challenge or block, with blocked cases going to an analyst review queue whose labels feed back into scoring.

Voog

  1. Gateway and application events are published to a stream with minimal personal data.
  2. Events are enriched with network (ASN), device and account context.
  3. Sliding-window features capture velocity, failure ratios and novelty.
  4. A rules layer handles known patterns; a model scores the rest.
  5. Decisions are returned within the request budget: allow, step-up challenge or block with a reason code.
  6. Analyst review outcomes become labels for tuning rules and retraining.

Disainiotsused

Synchronous or asynchronous scoring?
Synchronous for login and sign-up with a strict time budget and a fail-open default; asynchronous for everything else.
Rules versus models
Rules first for explainability and fast response to new attacks; models for subtle patterns, always with reason codes.
Data minimisation
Hash or truncate identifiers in the stream and keep raw data only where an investigation needs it.

Tulemid

  • Event schemas and feature definitions
  • Scoring service with decision API
  • Review queue and labelling workflow
  • Dashboards for precision, recall and latency

XML & ISO 20022 parsing pipeline

A hardened ingestion pipeline for large XML message files, including ISO 20022 pain, pacs and camt messages: streaming parsing, schema and business-rule validation, a canonical data model and controlled outputs.

Ulatus
File and API ingestion of XML messages into internal systems
Tehnoloogiad
  • Python or Go
  • libxml2 / StAX
  • XSD
  • PostgreSQL
  • Event bus
  • Object storage
XML pipeline: files arrive over SFTP or API, are parsed by a hardened streaming parser without DTD or external entities, validated against XSD and rules, mapped to a canonical model and then mapped out to legacy formats or published to an event bus; invalid messages go to quarantine.

Voog

  1. Files arrive over SFTP or API and are stored immutably with a checksum.
  2. A streaming parser processes elements one at a time with DTDs and external entities disabled.
  3. Each message is validated against the XSD version it declares, then against business rules.
  4. Valid content is mapped to a typed canonical model.
  5. Outputs are mapped to downstream formats or published as events.
  6. Invalid messages are quarantined with a machine-readable rejection report.

Disainiotsused

DOM or streaming?
Streaming, so memory stays flat for very large files and one bad element does not stop the batch.
Schema versions
Detect the namespace version per message and keep validators for every version you accept.
Truncation and character sets
Make mapping to legacy formats explicit and lossless where possible; record every truncation.

Tulemid

  • Parser hardening configuration
  • Validation rules with test fixtures
  • Canonical model and mappings
  • Quarantine and reprocessing tooling

Identity & verification module

A verification service modelled as an explicit state machine: strong electronic identification where available, attribute verification, screening, manual review and a fallback path – each transition logged and auditable.

Ulatus
Customer or partner verification inside an onboarding flow
Tehnoloogiad
  • OpenID Connect
  • Go or Node.js
  • PostgreSQL
  • Queue
  • Audit log
  • Admin UI
Verification state machine: started, authenticated with strong eID, attributes verified, screening, then approved, manual review or rejected; applicants without eID take a document and liveness fallback.

Voog

  1. The flow starts with a server-side session and a unique verification ID.
  2. The user authenticates with a supported strong eID via OpenID Connect.
  3. Returned attributes are verified and stored with their source and assurance level.
  4. Screening runs against configured lists and rules.
  5. Clear results are approved; possible matches go to manual review.
  6. Users without a supported eID take a document and liveness fallback path.

Disainiotsused

Explicit state machine
Every state and transition is enumerated, so invalid jumps are impossible and audits are straightforward.
Attribute minimisation
Request only the attributes the use case needs and store their provenance.
Asynchronous review
Possible matches never block the user session; they move to a queue with service-level targets.

Tulemid

  • State machine specification
  • Verification service and integration adapters
  • Audit log schema
  • Review tooling

High availability & failover

An active-active topology across two zones with health-checked global load balancing, replicated queues and databases, and recovery procedures that are rehearsed rather than assumed.

Ulatus
Critical request paths and their data stores
Tehnoloogiad
  • Kubernetes
  • Terraform
  • PostgreSQL replication
  • Kafka
  • Prometheus
  • Chaos testing
High-availability topology: a health-checked global load balancer distributes traffic to two active zones, each with gateways, services, a replicated queue and a database, with synchronous replication between the zones.

Voog

  1. A global load balancer health-checks both zones and routes away from failures.
  2. Each zone runs gateways and stateless services that can absorb the other zone’s load.
  3. Queues and databases replicate across zones according to the agreed RPO.
  4. Failover of stateful components is automated where safe and documented where manual.
  5. Game days rehearse zone loss, database failover and dependency outages.

Disainiotsused

Synchronous or asynchronous replication?
Synchronous where data loss is unacceptable and latency allows; asynchronous with a documented RPO elsewhere.
Capacity headroom
Each zone is sized to carry peak load alone, otherwise failover simply moves the outage.
Dependency failure
Every external dependency gets a timeout, a circuit breaker and a defined degraded mode.

Tulemid

  • SLOs and error budgets
  • Topology and failover design
  • Recovery runbooks
  • Game-day report

Docker & container scaling

A container platform layout that separates gateway, service and worker workloads, scales each on the signal that matters for it, and keeps images, secrets and configuration under control.

Ulatus
Containerised services from build to runtime
Tehnoloogiad
  • Docker
  • Kubernetes
  • Helm
  • KEDA
  • Vault
  • OpenTelemetry
Container platform: ingress routes to separate namespaces for gateways, services and workers, scaled on requests per second, CPU and queue lag respectively, with external secrets, versioned configuration, telemetry, a signed image registry and an infrastructure-as-code pipeline.

Voog

  1. Images are built reproducibly, scanned and signed in CI.
  2. Workloads are separated by namespace with their own quotas and policies.
  3. Gateways scale on request rate, services on CPU, workers on queue lag.
  4. Secrets come from an external vault; configuration is versioned.
  5. Telemetry is collected centrally with consistent resource labels.

Disainiotsused

Requests and limits
Set CPU requests from measurements; avoid CPU limits on latency-sensitive services where throttling hurts p99.
Scaling signal
Scale on the metric closest to user impact – request rate or queue lag – not only CPU.
Image policy
Only signed images from the registry may run in production.

Tulemid

  • Cluster and namespace layout
  • Helm charts and autoscaling policies
  • Supply-chain policy
  • Capacity test results

Kas teil on süsteem, mis peab skaleeruma või muutuma turvalisemaks?

Rääkige meile arhitektuurist, kitsaskohast või tähtajast. Vastame e-postiga ja lepime kokku aja ulatuse kohtumiseks.

Broneeri konsultatsioon