news.volyx.in

How I write back ends (github.com)

521 points by fpereiro · 2456 days ago · 186 comments on HN

Article summary

The article discusses the author's approach to writing backends for web applications, emphasizing simplicity and iterative improvement. The author describes their architecture, which uses Node.js, Redis, and Nginx, and explains how it can be scaled horizontally. The article also touches on security considerations, such as providing HTTPS support and securing Redis. The author encourages readers to share their feedback and experiences.

Main themes

  • Backend architecture
  • Database choice
  • Security considerations
  • Scalability
  • Performance
  • Data integrity
  • Technology trade-offs
  • Web development best practices

What commenters say

  • Using Redis as a database can be a good choice, but it may not be suitable for mission-critical data that requires strong consistency and durability guarantees.
  • Relational databases like Postgres can provide similar performance to Redis and offer stronger data integrity guarantees.
  • Text-based diagrams can be an effective and readable way to communicate complex ideas, but some readers may find them difficult to understand.
  • Using same-site cookies can help mitigate CSRF attacks and may make traditional CSRF tokens redundant.
  • Scaling a database can be challenging, and partitioning data across multiple nodes can introduce trade-offs between consistency and availability.
  • Security considerations, such as securing Redis and using HTTPS, are crucial when building a web application.
  • Different databases and technologies have their own strengths and weaknesses, and the choice of which one to use depends on the specific needs of the application.
  • Some readers appreciate the simplicity and expressiveness of Redis, while others prefer the stronger guarantees and features of relational databases.