Improving Bitrix Push Notifications with NodeJS: A Practical Setup Guide

Improving Bitrix Push Notifications with NodeJS: A Practical Setup Guide This NodeJS push-server solution optimizes Bitrix push notifications efficiently. Long Polling via PHP holds one process per connection. With 500 users, that’s 500 workers waiting for events. PHP-FPM hits limits, delivery la

Our competencies:

Frequently Asked Questions

Improving Bitrix Push Notifications with NodeJS: A Practical Setup Guide

This NodeJS push-server solution optimizes Bitrix push notifications efficiently. Long Polling via PHP holds one process per connection. With 500 users, that’s 500 workers waiting for events. PHP-FPM hits limits, delivery latency reaches 30 seconds. High-traffic e-commerce sites suffer: order notifications, chats, live feeds degrade. Without NodeJS, admins add servers wastefully. We solve this: a single Node process handles thousands of connections via an event loop. Our experience shows a 10x reduction in CPU load and up to 50% infrastructure cost savings — e.g., $2,000/month on a three-server setup. For a site with 1,000 users, the savings exceed $1,000/month. Contact us for a free consultation; we’ll assess your project in one day.

How NodeJS Solves the Blocking Problem

NodeJS uses an event-driven, non-blocking I/O model built on libuv and epoll, making it 20 times more efficient in concurrent connections than PHP Long Polling. The Bitrix push-server package (push-server) receives events from PHP via HTTP, queues in Redis, and delivers via WebSocket or SSE. NodeJS reduces memory per connection by 2000 times and latency by 30 times compared to PHP. According to Bitrix official documentation, this bypasses PHP-FPM limits and reduces latency from 30 seconds to under 1 second.

Why NodeJS Beats PHP for Push Notifications

Parameter Long Polling (PHP) NodeJS + WebSocket
Connections per server up to 500 (FPM limit) up to 10,000
Memory per connection ~10–20 MB (process) ~10 KB (event loop)
Delivery latency up to 30 s (polling interval) < 1 s
CPU load high (frequent pool checks) low (asynchronous)
Infrastructure cost needs extra servers up to 50% savings

NodeJS is 20 times more efficient than PHP for concurrent connections, uses 2000x less memory per connection, and reduces latency by 30x.

Real‑World Case: E‑commerce Site with 3,000 Concurrent Users

We set up a push-server for a large online store with 3,000 active concurrent users. Before, Long Polling consumed 800+ PHP workers. After deploying NodeJS push-server, workers dropped to 20, memory from 16 GB to 2 GB, latency from 20 s to 0.5 s. The client saved on two servers, cutting costs by 30% ($1,500/month). With 10+ years of experience and 200+ projects, we deliver reliable solutions.

What’s Included in the Setup

  • Installation of NodeJS LTS and Redis
  • Download and configure push-server
  • Systemd unit for auto-start with monitoring
  • Nginx WebSocket proxy with SSL termination
  • Bitrix integration (admin panel or API)
  • Load testing up to 10,000 connections
  • Operational documentation and team training
  • 30 days of post-deployment support

Estimated timeline: 2 to 5 days. Pricing from $1,500, determined after an audit.

Step-by-Step Setup Guide

  1. Install NodeJS and Redis on the server (or use Bitrix VM with pre-installed push-server).
  2. Download the push-server package from the Bitrix repository (available to BitrixEnv subscribers).
  3. Configure config.json with security key, Redis settings, and ports.
  4. Set up a systemd service for persistent operation.
  5. Configure Nginx proxy for WebSocket and HTTP endpoints.
  6. Integrate with Bitrix via the admin panel (Settings → Push and Pull → Server).
  7. Load test with up to 10,000 connections using wscat or custom scripts.
  8. Verify operation with curl and monitoring logs.

Configuration Example

push-server config.json
{ "server": { "http": { "port": 9010, "host": "127.0.0.1" }, "websocket": { "port": 9011, "host": "0.0.0.0" } }, "security": { "key": "your_secret_key_here", "cors": ["https://your.bitrix24.com"] }, "redis": { "host": "127.0.0.1", "port": 6379, "database": 1 }, "log": { "level": "warn", "file": "/var/log/push-server/app.log" }, "cluster": { "workers": 2 } } 
Nginx WebSocket proxy config
location /bitrix/subws/ { proxy_pass http://127.0.0.1:9011; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 86400; } location /bitrix/pub/ { proxy_pass http://127.0.0.1:9010; proxy_buffering off; } 

Configuring Bitrix

In the admin panel: “Settings” → “Push and Pull” → “Server” tab. Specify:

  • Push server: http://127.0.0.1:9010
  • Pull server (public): https://your.bitrix24.com/bitrix/pub/
  • WebSocket server: wss://your.bitrix24.com/bitrix/subws/
  • Security key: must match the one in config.json

Or via code (see official Bitrix documentation).

Common Pitfalls

  • Wrong secret key — keys must match. Test with curl -s http://127.0.0.1:9010/server/ping; expected {"result":"pong"}.
  • Firewall blocking — ensure port 9011 is open externally and Nginx proxies correctly.
  • Insufficient file descriptors — set ulimit -n to 20,000; add LimitNOFILE=65535 to systemd unit.

Additional Timeline Table

Phase Activities Duration
Analysis Audit current config, evaluate load 1 day
Design Choose stack, write configurations 1 day
Implementation Install and configure services 1–2 days
Testing Load test up to 10,000 connections 1 day
Documentation Create operational instructions 0.5 day

Verification

After setup, run:

curl -s http://127.0.0.1:9010/server/ping 

Expected: {"result":"pong"}. For WebSocket, use wscat. Monitor logs with journalctl -u push-server -f. Learn more about WebSocket technology on WebSocket Wikipedia.

Contact us — we will set up push notifications with guaranteed stable operation. Get a free consultation.