Hacker Newsnew | past | comments | ask | show | jobs | submit | avan1's commentslogin

Thanks for the both great tools. just i didn't understand one thing ? the request flow, imaging we have 10 servers where we choose this request goes to server 1 and the other goes to 7 for example. and since its zero down time, how it says server 5 is updating so till it gets up no request should go there.


I think there are two different cases here. Not sure which one you’re talking about.

1. External requests, e.g. from the internet via the reverse proxy (Caddy) running in the cluster.

The rollout works on the container, not the server level. Each container registers itself in Caddy so it knows which containers to forward and distribute requests to.

When doing a rollout, a new version of container is started first, registers in caddy, then the old one is removed. This is repeated for each service container. This way, at any time there are running containers that serve requests.

It doesn’t say any server that requests shouldn’t go there. It just updates upstreams in the caddy config to send requests to the containers that are up and healthy.

2. Service to service requests within the cluster. In this case, a service DNS name is resolved to a list of IP addresses (running containers). And the client decides which one to send a request to or whether to distribute requests among them.

When the service is updated, the client needs to resolve the name again to get the up-to-date list of IPs. Many http clients handle this automatically so using http://service-name as an endpoint typically just works. But zero downtime should still be handled by the client in this case.


With over eight years of leadership experience in technology teams, I have witnessed the challenges and opportunities in our fast-paced industry. To enhance team performance and project outcomes, I developed a methodology called Cycle.

The Cycle approach emphasizes a flexible, lightweight methodology designed to keep teams focused, collaborative, and adaptable, with no backlog overload, minimal ceremonies, and shared responsibility.

Explore Cycle on GitHub: https://github.com/oneapplab/cycle


author here. thanks for reading my post. i didn't suggest php for all type of projects. i don't choose that myself. what i just mentioned if the only reason to choose something else for responding some apis faster you still may continue in php for that.


as i mentioned we just choosed frankenphp which is officially supported by php foundation. also only less than 5 percent of our code base is in Go. i don't see any problem to hire developers.


i don't recommend rewrite in anycase (had done 2 successful rewrite before but still i don't choose that my self) and new php run times can may be really fast. you can checkout benchmarks. swoole for instance if used with all the functionalities like its specific caches may be so fast (in some cases as fast as Go)


good idea, which language you choose for that ? also with frankenphp you can just write those required apis to be really fast as go extensions.


Go, naturally.


Perfect. we wrote our gateway in Go which handle authentication as well and then pass users data to other services (Go and php) and return their responses.


if you know more about it, i would glad to hear which extension they did developed for business logic. i used a lot of Yahoo! in back days.


thanks. but may you explain more. we just choosed frankenphp but i did't see if it makes debugging it much worse.


Working with 3 intersecting stacks is more complex than a single stack. Go toolchain is batteries included and coherent. Author admits to not using it bc of legacy (and preference).


author here. as i mentioned in post i said we choose frankenphp since it's already supported by php foundation and in some cases we might use Go php extensions. i know writing extensions in any language add a bit complexitiy but i believe if the extensions selected wisely they will be somehow fire and forget. for instance creating pdf files would be faster in Go than php. you can create an pdf creator extension and that extension would probebly work for a long time without any adding much effort to maintenance.


thanks for suggestion. looks cool. but as you said far from production ready. we choosed frankenphp since we saw it got support by php foundation.


4 years ago we have been in same situation and we choosed to continue in php with choosing version 8. so far it works for us all these years.


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

Search: