Multipurpose Application Server for Node.JS. All decisions are made. Solutions are scaled. Tools are provided and optimized for high load. Ready for applied development and production.
1. Multipurpose Application Server for Node.JS
All decisions are made. Solutions are scaled
Tools are provided and optimized for high load
Ready for applied development and production
2. Scaling
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins
1
Multiple applications
• at single server
• at single node.js process
• at single tcp/ip port
• at one domain (different path)
One application
• multiple processes at single server
• multiple processes at multiple servers
• at multiple domains (virtualhosts)
• at multiple network interfaces
• at multiple ports
• over multiple protocols
3. Scaling
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins
2
Deployment strategies:
• All in one process (for development):
cluster.strategy: "single"
• Separate process for each host/port pair:
cluster.strategy: "specialization"
• Single server cluster, master + multiple workers
cluster: { strategy: "multiple", workers: N }
• Single server cluster with IP-sticky
cluster.strategy: "sticky"
• Multiple servers with multiple workers on each:
strategy: "specialization", + nginx
provides balancing and sticky
• Applied cloud: hardware balancer,
multiple servers with multiple workers,
strategy: "multiple", ØMQ, impress controller
11. API Development
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins
10
• RPC API (Stateful, state will store in RAM
between request/response pairs)
• REST API (Stateless, each request/responce
is independent, order is not important,
state is not stored in RAM)
State classification:
• system global state
• session (or connection) state
• user state
• data-object (subject domain) state