For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | more akoutmos's commentsregister

While there is no automatic way of doing it (as far as I know), I have been using Tailwind's @apply directive for things that are used site wide and that has worked out well. Really excited to use the latest 1.7 version that makes this process even easier given you don't need to split up pseudo classes https://github.com/tailwindlabs/tailwindcss/pull/2159.


Great article and thanks for sharing! There are a couple of things that stand out at me as possible architecture smells (hopefully this comes across as positive constructive criticism :)).

As someone who has been developing on the BEAM for long time now, it usually sticks out like a sore thumb any time I see Elixir/Erlang paired with Redis. Not that there is anything wrong with Redis, but most of the time you can save yourself the additional Ops dependency and application network hop by bringing that state into your application (BEAM languages excel at writing stateful applications).

In the article you write that you were using Redis for rate limit checks. You could have very easily bundled that validation into the Elixir application and had for example a single GenServer running per customer that performs the rate limiting validation (I actually wrote a blog post on this using the leaky bucket and token bucket algorithms https://akoutmos.com/post/rate-limiting-with-genservers/). Pair this with hot code deployments, you would not lose rate limit values across application deployments.

I would be curious to see how much more mileage you could have gotten with that given that the Node application would not have to make network calls to the Elixir service and Redis.

Just wanted to share that little tidbit as it is something that I see quite often with people new to the BEAM :). Thanks again for sharing!


I would push rate limiting to the load balancer, HAProxy or Nginx, but that's just me. If you have a round-robin LB in front you just set each instance to limit at 1/nodes rate, that way you don't have to share any state.

If you're load balancing on IP hash you can set each instance to limit at full rate and not worry about it.

Shared state in rate limiting becomes a bottleneck very quickly. If you're trying to mitigate spam/DDOS you could easily get 100,000 requests a second. You're going to max out your shared state db way faster than 10gig lines


That is definitely a valid route to go so long as your rate limiting is not dependent on much business logic. If rate limiting is per user or per user per instance/service, I would personally bring that kind of concern into the application where it is closer to the persistence layer where those things are defined (and again handling the business logic inside per customer GenServers).

I have never used this product so just speculation. But I imagine there is some sort of auth token that valid agents send to tell Bearer that this is a valid/invalid request so that things can be trivially rejected to mitigate a DoS/DDoS to an extent.


I would be very interested in working together on a publication...unfortunately the last couple times I submitted a proposal I never heard back. Is the write-with-us form page working properly, or was my proposal that bad :P ?


Sorry about that. I haven't gotten back to everyone - we're working on improving process so that we give everyone a firm answer.


just write it yourself, you don't need their permission!


https://akoutmos.com/

I started a blog the middle of last year and have written mostly about topics related to Elixir. But have also covered topics like RabbitMQ, Prometheus, Grafana, and PostGIS. I find my own blog very useful as I often reference the associated GitHub tutorial projects to remind myself how I did something :D.

Next week's post is about using Loki for structured logging!


In this post I cover how to leverage RabbitMQ along side Broadway to process data from the HackerNews Firebase API. I also leverage Prometheus and Grafana to monitor the application and ensure that the pipeline is performing as expected.


That's the approach that I take as well most of the time. Makes it pretty seamless to then take that container and run it in your cloud provider of choice. I put together a blog post outlining the use of Docker + Mix Releases for a Phoenix app https://akoutmos.com/post/multipart-docker-and-elixir-1.9-re... to help people get started.


Great post and thanks for sharing! I've been seeing quite a bit of Render these days. Does anyone have any production experience with it and what are your thoughts? Also for those interested in using Elixir 1.9 releases along with Docker, I wrote a blog post a couple months ago: https://akoutmos.com/post/multipart-docker-and-elixir-1.9-re...


Indie Hackers runs Render in production.


First time I'm hearing of this community; first glance, it looks great! However, I was trying to check out the content in the footer, but the scrolling pagination makes it impossible. :(


Yeah, the UX on IH frustrates me sometimes, too.

Courtland has said before that he regrets going all in on making it a SPA instead of a more traditional back-end MVC. But he wanted to learn Ember and I can totally get that.


That is certainly a big community. Are there any other resources on how reliable this is for larger projects? How long has Render been around?

The name makes it quite hard to google for, without immediately diving into some React documentation :)


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You