Skip to main content

Batoi navigation

Batoi RAD Docs

Application Scalability, Performance and Accessibility

Plan how Batoi RAD applications grow across traffic, data and infrastructure, and validate capacity with workload-specific tests.

Version 1.x Active framework documentation Reviewed Jul 21, 2026 Next review Oct 21, 2026

Owner: Batoi Engineering Reviewed by: Batoi RAD Maintainers Source revision: bb9902c

Browse Batoi RAD Documentation Application Scalability, Performance and Accessibility

Application Scalability, Performance and Accessibility

A RAD application can grow through query optimization, increased server resources, and a carefully configured multi-server deployment. RAD’s separation of routes, business logic, presentation, and data access gives teams clear places to make these changes. Actual capacity depends on the application workload and the infrastructure that runs it.

Treat performance and accessibility as release requirements. Define measurable targets for representative user journeys and test the exact release artifact.

Performance Review

Measure response latency, query volume, repeated work, memory, asset weight, and browser responsiveness. Investigate regressions against the route's established baseline instead of assuming one universal threshold fits every workflow.

How RAD Applications Scale

Batoi RAD provides a PHP application framework with structured routes, application classes, database access, sessions, and authorization. The capacity of an application built with RAD depends on its workload, implementation, database design, and hosting configuration. Development speed and production capacity are separate considerations.

Plan growth in stages: optimize the application and database, increase resources where measurements justify it, and introduce multiple application servers or specialist services when the workload requires them. These are deployment and engineering choices to implement and verify for each application; they are not automatic scaling guarantees supplied by the framework.

There is no universal number of users or records that describes every RAD application. A public page, a filtered search, an image upload, and a large report consume different resources. Registered accounts also differ from simultaneous active users and requests per second. Agree on these measures before making a capacity commitment.

Architecture for Growth

RAD separates request routing, business logic, rendering, and data access. Focused application classes let teams improve expensive operations without mixing them into page rendering. Explicit data-access and file-delivery boundaries help identify database and storage bottlenecks. These boundaries support scaling work; distributing application state still requires deliberate engineering. The illustration shows a possible scale-out deployment: additional RAD application instances serve requests while data and state are coordinated across them. Microservicelets remain modules within each application instance; they are not automatically independent services.

Batoi RAD architecture: a foundation for application growth Web and API clients reach a configured load balancer, which distributes requests to multiple instances of the same RAD application. Each instance contains routing and authorization, microservicelets and business logic, and rendering and data access. Instances depend on a coordinated data and state strategy for database access, sessions, files, and caches. This is a logical grouping, not a single shared service or an assertion that these stores are already distributed. Optional workers and search services handle specialized workloads. Multiple nodes, shared state, and integrations require deployment engineering and capacity validation; they are not enabled automatically. One application structure. A deployment that can grow. Illustrative scale-out topology • Configure and validate for your workload Web and API clients Load balancer and health checks Deployment configuration RAD instance 1RAD instance 2Additional instances Routing + authorizationRouting + authorizationRouting + authorization Microservicelets + logicMicroservicelets + logicMicroservicelets + logic Rendering + data accessRendering + data accessRendering + data access Same application releaseSame application releaseAdd capacity when justified Data and state strategy • logical grouping, not one service DatabaseSessionsFiles and mediaCaches Queries, indexes, capacityContinuity and expiryShared access + permissionsLocal or shared; invalidate Optional integrations: background workers • search • public-media CDN Scale up resources. Scale out application instances. Measure the whole system. Shared state, load balancing, and optional services require implementation and verification.
Figure: An illustrative RAD scale-out deployment. Equivalent application instances serve traffic through a load balancer, with coordinated data and state. Shared services and optional integrations require configuration and validation.

On smaller screens, scroll the illustration or tables horizontally to see all details.

A Practical Growth Path

StageApplication and infrastructure workEvidence to collect
First production releaseBound queries; paginate; index; optimize images; size PHP and database; enable backups and monitoring.Journey latency, errors, and correctness under representative load.
Growing traffic and dataTune queries and worker limits; add resources; separate application and database hosting if needed.Query plans, saturation, connection usage, and peak-load cost.
Multiple application serversAdd load balancing; coordinate sessions, files, caches, releases, and job ownership.Login continuity, data consistency, safe retries, and node-removal behavior.
Specialized workloadsEvaluate search services, background workers, or read replicas for measured bottlenecks.Freshness, job duration, replication lag, recovery, and cost.

Scaling up means increasing resources on a server. Scaling out means distributing work across servers. Either approach must account for the database and external services; adding web servers alone does not remove a slow query or an external API limit.

Before Adding Application Servers

Use this checklist when preparing a multi-server deployment. The reviewed RAD session manager uses PHP session handling, while its cache service stores entries on the filesystem. Verify the selected RAD release and hosting configuration before treating sessions or caches as distributed services.

  • Sessions: verify the PHP session storage used by the deployed runtime. A database authentication record does not by itself make PHP session data shared. Use and test a compatible session strategy across nodes, including expiry, revocation, and node failure. Sticky sessions alone do not provide session failover.
  • Files: make required uploads available to every serving node through a tested shared-storage or object-storage integration. Keep private files behind permission checks. A public CDN is suitable only for content deliberately approved for public delivery.
  • Caches: choose what may be cached, how it varies by user or workspace, and how changes invalidate it. Node-local caches need consistent invalidation or bounded expiry. Never reuse a private response across identities or tenants.
  • Releases: keep code, configuration, and compatible database changes coordinated across nodes. Verify health checks, traffic draining, rollback, and recovery before switching traffic.
  • Background work: when introducing workers or schedulers, define durable job storage, retries, idempotency, and ownership so multiple nodes cannot accidentally repeat the same operation.

Capacity and availability are separate goals. Multiple application instances can increase serving capacity, but the load balancer, database, session store, and file storage can still be single points of failure. Define redundancy, backups, restore tests, and failover behavior for the complete deployment against agreed recovery objectives.

The default PHP session handler stores session data in files; the actual handler is configurable and must be checked in the target environment. See the PHP session configuration reference.

Database and Media Growth

Design queries around the actual filters, sorting, joins, and authorization boundaries. Fetch only needed columns, paginate lists, and inspect query plans with representative data. Indexes can improve reads but consume space and add write work, so validate their effect on the full workload. See the MySQL index optimization guide.

Read replicas require deliberate read routing and a policy for replication lag; they do not automatically increase write capacity. Partitioning or sharding is a separate architectural decision. Do not assume either is necessary merely because the record count grows.

For media-heavy applications, serve appropriately sized images, limit upload size, and measure storage and bandwidth separately from database size. If image processing or report generation becomes slow, evaluate background processing instead of holding the interactive request open. Such integrations require application-specific implementation and operational checks.

Validate Capacity Before Committing

Agree on a workload and a pass/fail definition with the application owner before testing.

DimensionRecord in the test plan
TrafficConcurrent active users, requests per second, request mix, think time, peak duration, and burst behavior.
DataRecord volume, distribution, history, file count and size, and expected growth.
User experiencePer-journey p50/p95/p99 latency targets, browser experience, and error-rate limits.
CorrectnessAuthorization, tenant isolation where applicable, data consistency, duplicate prevention, and session behavior under load.
OperationsCPU, memory, disk I/O, database connections, queue age where applicable, recovery objectives, and hosting cost.

Latency percentiles describe the distribution of response times: p95 is the time within which 95% of measured requests finish. Record latency by journey so fast browsing does not hide slow writes or searches.

Start with a baseline, increase load in steps, sustain the agreed peak, and exercise bursts and recovery. Test cold and warm caches, reads and writes, and external-service failures. Use an authorized test environment with representative data rather than treating a demonstration or an isolated fast request as a benchmark.

Retain the application revision, runtime versions, infrastructure specification, dataset, test script, duration, results, and observed limits. Repeat the relevant tests after changes that affect capacity. Any published capacity figure should identify these conditions; this guide does not assert a benchmark, availability SLA, or fixed user limit.

Responsibilities and Next Steps

The application team owns business logic, queries, authorization, and workload tests. The hosting or operations team owns resource sizing, network and storage configuration, monitoring, backups, and recovery. Agree explicitly who operates shared services and resolves incidents. Confirm the support and hosting scope for the chosen deployment.

For a sizing discussion, bring the critical user journeys, expected simultaneous activity, first-year data and media growth, response-time and availability objectives, preferred hosting environment, and budget. Use those inputs to agree on an initial deployment and a repeatable capacity test.

Read Architecture, Files and assets, and Observability and incidents alongside this guide.

Accessibility Review

Target WCAG 2.2 AA for critical experiences. Automated checks should cover landmarks, headings, labels, accessible names, focus visibility, and common contrast failures. Manual checks should include keyboard-only navigation, zoom, screen-reader announcements, dialogs, menus, errors, and focus return.

Automated tests catch common regressions; they do not replace testing a new workflow with assistive technology.