š How to Push Solana Transactions Under 500ms (Even During Congestion) ā A Practical Guide for TypeScript HFT Builders
Why your HFT bot keeps getting stuck in Solana traffic ā and how AllenHark Relay fixes it.
High-frequency trading on Solana is a completely different game from building a normal arbitrage or liquidation bot. When the network is hot, block leaders rotate every ~400ms, transaction queues balloon instantly, and your beautifully crafted arbitrage opportunity dies in the mempool before it gets a chance to land.
If you're a TypeScript engineer trying to push signed transactions in <500ms with near-zero packet drop, this guide breaks down the architecture, best practices, and endpoint configuration patterns used by professional HFT teams ā including how AllenHark Relay gives you consistent performance even during congestion.
1. The Real Bottleneck: Network Propagation, Not Signing
Most Solana HFT setups optimize the wrong step.
Your fastest signing architecture won't matter if:
- Your RPC is a public shared node
- Your packets hit the public TPU fanout
- You aren't injected directly into leader nodes
- You rely solely on
sendTransactioninstead of QUIC sends - You have no tip prioritization pipeline
Propagation delay kills more trades than signing latency.
AllenHark Relay minimizes propagation time by directly feeding your packets into leader-adjacent nodes with private priority lanes.
2. The TypeScript Architecture Used by Most Successful HFT Bots
Below is the recommended production pattern:
(a) Pre-sign your transactions
Never sign on-demand:
const ix = createYourIx();
const message = new TransactionMessage({
payerKey: wallet.publicKey,
recentBlockhash,
instructions: [ix]
}).compileToV0Message();
const rawTx = new VersionedTransaction(message);
rawTx.sign([wallet]);
const serialized = rawTx.serialize();
Then pipe this directly to your relay.
(b) Use a dedicated QUIC sender
Public RPC ā WebSockets ā sendTransaction()
= slow, unpredictable, packet drop hell.
What you want instead:
- A QUIC client that writes raw UDP datagrams
- Persistent keep-alive channels (no TLS renegotiation)
- Direct leader feed entry
AllenHark Relay exposes:
- QUIC:
quic-relay.allenhark.com:4433 - HTTPS:
https://relay.allenhark.com - IP:
151.241.178.21(Frankfurt)
Trade bots interact through a thin TypeScript client or raw QUIC packets:
// Example using HTTPS for simplicity (QUIC recommended for speed)
await fetch("https://relay.allenhark.com/v1/sendTx", {
method: "POST",
body: JSON.stringify({
jsonrpc: "2.0",
method: "sendTransaction",
params: [
base58SignedTx,
{ skipPreflight: true }
]
})
});
(c) Keep multiple connections warm
Real HFT setups run:
- 1 QUIC channel for priority send
- 1 backup QUIC channel
- 1 HTTP client (axios/keep-alive)
- 1 websocket stream for slots/leader
Your goal is zero cold starts.
const agent = new http.Agent({ keepAlive: true });
const api = axios.create({
baseURL: "https://relay.allenhark.com",
httpAgent: agent,
timeout: 300
});
3. RPC Config for Low-Latency Sends
Use these settings everywhere:
getLatestBlockhash({
commitment: "processed"
});
Why?
- "processed" gives blockhashes 200ā600ms fresher
- "confirmed" adds latency
- "finalized" is too slow for HFT
Also:
// When using standard RPC methods
sendRawTransaction(serialized, {
skipPreflight: true,
maxRetries: 0
});
Preflight is a killer ā drop it for anything HFT.
4. The Role of Tips: Your Fast Lane into Leader Blocks
During congestion, Solana prioritizes tipped transactions.
Most bot builders send:
- too low tips (1ā5k lamports)
- inconsistent tips
- no adaptive curve
AllenHark Relay requires a minimum tip of 0.001 SOL (1,000,000 lamports).
You must transfer this tip to one of our designated tip wallets in the same transaction.
Example Tip Wallets:
hark1zxc5Rz3K8Kquz79WPWFEgNCFeJnsMJ16f22uNPharkm2BTWxZuszoNpZnfe84jRbQTg6KGHaQBmWzDGQQ- ... (see docs for full list)
5. Why a Private Relay Beats Public RPC Every Time
Public RPC nodes: ā Shared bandwidth ā Unpredictable queueing ā Packet drops during hot moments ā No direct leader peering ā No mempool bypass
AllenHark Relay: ā Direct injection into leader nodes ā Private mempool lanes ā HFT-optimized QUIC senders ā 80% stake coverage across leaders ā No rate limits (for pro users) ā Always-on high-priority networking
Professional traders use private relays because network position is a competitive advantage.
6. Full Recommended Setup for 500ms or Faster Delivery
Backend stack (TypeScript):
@solana/web3.jsorhelius-labs/solanafor signing- Axios with keep-alive for control-plane requests
- QUIC client for data-plane raw sends
- AllenHark Relay endpoint for priority routing
- Adaptive tip algorithm
- Parallel hot connections
- Pre-signed transactions
Expected performance:
- 80ā130ms propagation
- 300ā450ms block inclusion
- <1% drop rate
- Consistent behavior even in 2M TPS spikes
7. Final Advice: Co-Locate with the Relay
If you're running:
- market-making bots
- arbitrage
- liquidation engines
- MEV searchers
- Jito bundles
- pump detection engines
Co-location cuts your latency another 80ā120ms.
We offer physical or virtual co-location in Frankfurt, Tokyo, and New York.
If your PnL depends on landing in the next 1ā3 slots, co-location is the single biggest performance upgrade.
CTA: Ready to Build a Fast Bot? Connect to AllenHark Relay
If you want:
- ā” Transaction landing time under 500ms
- ā” Dedicated HFT-grade QUIC channels
- ā” Priority transaction routing
- ā” No rate limits
- ā” Leader adjacency
- ā” Near-zero packet drop
Then AllenHark Relay is engineered for you.