GitHub user niclash created a discussion: Pulsar Functions lifecycle and depolyment details.
Hi, I have been using Pulsar quite successfully for a bit more than a year now, and quite happy with it. Now, I would like to streamline my app a bit and use Pulsar Functions (on 2.11.x), but I need a little bit of guidance. 1. IIUIC, I have the option (among other) to run my functions (trusted) inside the same JVM as the Pulsar Broker itself, by choosing "Run function workers with brokers" and the "thread runtime". And if I want to run on the same VM as the broker, but in separate OS process, I simply follow "process runtime". Is that correct? I don't need K8s to run functions (I have not set up K8s)? 2. Lifecycle of functions is very unclear to me. a. How many instances are created? b. One per request? c. One per key? d. Are instances pooled? e. Do the functions need to be thread-safe? f. Can I control it? 3. Deployment a. When deploying with "pulsar-admin functions create", do I need to do that on each broker instance, or just once? What happens if my Ansible tries to do that in parallel on all instances? b. I assume that "pulsar-admin functions update" will let all functions complete before killing the thread/process. Right? I guess there will be more questions once I dive deeper. TIA Niclas GitHub link: https://github.com/apache/pulsar/discussions/20195 ---- This is an automatically sent email for commits@pulsar.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@pulsar.apache.org