Verified
Posts
-
AI... A new dawn, or the demise of humanity ? -
AI... A new dawn, or the demise of humanity ?@phenomlab he’s off his head .
-
OGProxy - a replacement for iFramelyOk I’ll install the old version in the meantime… Or maybe just wait if it’s not too long
-
OGProxy - a replacement for iFramely@DownPW Not yet. One or two bugs left to resolve, then it’ll be posted.
-
OGProxy - a replacement for iFramely@phenomlab said in OGProxy - a replacement for iFramely:
And now, changes made to the back-end Proxy Server to increase performance
Key Changes Made:
- Rate Limiting
Added express-rate-limit to limit requests from a single IP.
- Logging
Integrated morgan for logging HTTP requests.
- Health Check Endpoint
Added a simple endpoint to check the server’s status.
- Data Validation
Implemented input validation for the URL using Joi.
- Environment Variables
Used
dotenv
for managing sensitive data like API keys and port configuration.- Error Handling
Enhanced error logging for debugging purposes.
- Asynchronous Error Handling
Utilize a centralized error-handling middleware to manage errors in one place.
- Environment Variable Management
Use environment variables for more configuration options, such as cache duration or allowed origins, making it easier to change configurations without altering the code.
- Static Response Handling
Use a middleware for handling static responses or messages instead of duplicating logic.
- Compression Middleware
Add compression middleware to reduce the size of the response bodies, which can improve performance, especially for larger responses.
- Timeout Handling on Requests
Handle timeouts for the requests made to the target URLs and provide appropriate error responses.
- Security Improvements
Implement security best practices, such as Helmet for setting HTTP headers, which can help protect against well-known vulnerabilities.
- Logging Configuration
Improve logging with different levels (e.g., info, error) using a logging library like winston, which provides more control over logging output.
- Graceful Shutdown
Implement graceful shutdown logic to handle server termination more smoothly, especially during deployment.
- Monitoring and Metrics
Integrate monitoring tools like Prometheus or an APM tool for better insights into the application’s performance and resource usage.
- Response Schema Validation
Use libraries like
Joi
orAjv
to validate responses sent back to the client, ensuring they conform to expected formats.Again, this new code is running here in test for a few weeks.
code updated on github or not ?
-
AI... A new dawn, or the demise of humanity ?https://www.bbc.co.uk/news/articles/c93716xdgzqo
Seems very odd to sue a company you co founded…
-
Clustering for NodeBB enabled@DownPW looks like Valkey is in fact a fork of redis
-
Clustering for NodeBB enabled@phenomlab said in Clustering for NodeBB enabled:
Redis will be
There is alternative like Valkey but I don’t know if it is compatible with nodeBB.
NodeBB don’t update his documentation for this subjetct… -
Clustering for NodeBB enabled@DownPW good question. I suspect if the worst comes to it, Redis will be forked from the community perspective but I don’t know of any currently.
-
Clustering for NodeBB enabledGiven what is happening with Redis, is there an alternative for NodeBB like Valkey for example
I am asking because I am setting up a new server.