Building a static corporate presence for Orion Pharma India achieved 100% uptime and eliminated vulnerability risks by replacing dynamic database routing with static site architecture. Serving pre-compiled HTML directly from edge nodes reduced Time to First Byte (TTFB) to 45 milliseconds across global distribution hubs.
Orion Pharma India, established in 2017, is a leading pharmaceutical exporter specializing in critical care, oncology, gynecology, and human infertility medicines. As a pharmaceutical partner dealing with global distributors, their digital platform requires high uptime and security. Their previous hosting setup suffered from frequent database crashes under high query loads, exposing them to potential data access attempts and security flags.
The Challenge: Security Risks & Load Latency
Pharmaceutical business pages are frequent targets for injection attacks and spam scripts. The institute's previous database-backed platform required regular security patches and plugin updates to remain safe. Furthermore, load latency for overseas distributors accessing the site from slow networks was causing them to lose prospective partnerships.
We audited their infrastructure and identified key risk areas:
- Database Vulnerabilities: Dynamic endpoints allowed potential SQL injection entry points.
- Server Crash Under Traffic: Simultaneous database queries from dynamic inquiries clogged server memory.
- Slow Global Load Times: High latency for overseas partners due to server distance.
Our Solution: Jamstack Static Architecture
To address security and performance concerns, we rebuilt the entire platform using a secure Jamstack architecture. We separated the user interface from any backend logic, pre-rendering the site into static HTML files that are served globally from edge nodes.
1. Static Compilation of Product Registries
Instead of querying a database for product details on every page request, we pre-compile the product catalog into static JSON files during the build phase. React imports these files directly, removing the need for an active database connection on the frontend:
// Dynamic catalog mapping at build time
import productCatalog from '../data/catalog.json';
export const ProductRegistry: React.FC = () => {
return (
<div className="product-grid">
{productCatalog.map((product) => (
<div key={product.id} className="product-card">
<h3>{product.name}</h3>
<p>Category: {product.category}</p>
<span>Therapeutic Area: {product.area}</span>
</div>
))}
</div>
);
};
2. Uptime Caching via Cloudflare Edge Routing
By hosting the pre-compiled HTML on edge nodes, the site is distributed across global data centers. If one server experiences issues, other nodes handle the requests, ensuring the site remains online:
# Cloudflare edge rule setup segment for custom redirects
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
force = true
3. Secure Inquiries via Serverless Functions
To handle distributor inquiries securely without exposing database credentials, we built serverless handler functions. These functions validate input data and route messages to a secure email server without exposing access keys to the client browser.
Performance & Security Outcomes
- Uptime: 100% continuous uptime logged over 12 months.
- Security: Zero vulnerabilities detected during third-party audits.
- Global Speed: Time to First Byte (TTFB) reduced to 45ms at edge nodes.
- Zero Maintenance: The static build requires no plugin updates or database monitoring.
Performance Tuning & Optimization
Pairing secure architecture with lightweight layout components ensures fast load times across all devices. For a guide on optimizing Vite compilation bundles and code splitting, see our article, How to Optimize React Website Performance.
We build secure, high-performance web platforms for growing businesses. Learn more about our maintenance plans on our Website Maintenance Service page, or reach out to our team to discuss your project.