Skip to content

Update falcon 0.48.6 → 0.51.0 (major)#767

Closed
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/falcon-0.51.0
Closed

Update falcon 0.48.6 → 0.51.0 (major)#767
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/falcon-0.51.0

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu bot commented Mar 2, 2025

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ falcon (0.48.6 → 0.51.0) · Repo · Changelog

Release Notes

0.51.0 (from changelog)

  • Introduce {ruby Falcon::Environment::Server#make_server} which gives you full control over the server creation process.

Introduce Async::Container::Supervisor.

Async::Container::Supervisor is a new supervisor implementation that replaces Falcon's own supervisor. This allows you to use the same supervisor for all your services, and provides a more consistent interface for managing services. The supervisor is now a separate gem, async-container-supervisor.

By default, the supervisor does not perform any monitoring, but you may add monitoring by defining them in the service definition. For example:

service "hello.localhost" do
# Configure server...

<span class="pl-en">include</span> <span class="pl-v">Async</span>::<span class="pl-v">Container</span>::<span class="pl-v">Supervisor</span>::<span class="pl-v">Supervised</span>

end

service "supervisor" do
include Async::Container::Supervisor::Environment

<span class="pl-en">monitors</span> <span class="pl-k">do</span>
	<span class="pl-kos">[</span>
		<span class="pl-c"># Limit total memory usage to 512MiB:</span>
		<span class="pl-v">Async</span>::<span class="pl-v">Container</span>::<span class="pl-v">Supervisor</span>::<span class="pl-v">MemoryMonitor</span><span class="pl-kos">.</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-pds">interval</span>: <span class="pl-c1">10</span><span class="pl-kos">,</span> <span class="pl-pds">limit</span>: <span class="pl-c1">1024</span> * <span class="pl-c1">1024</span> * <span class="pl-c1">512</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
	<span class="pl-kos">]</span>
<span class="pl-k">end</span>

end

We retain the falcon:supervisor:restart task, but you may prefer to use async:container:supervisor:restart directly.

0.50.0 (from changelog)

  • Add {ruby Falcon::Environment::Server#endpoint_options} to allow configuration of the endpoint options more easily.

0.49.0 (from changelog)

Falcon Server Container Health Checks

{ruby Falcon::Service::Server} adds support for the {ruby Async::Container} health check which detects hung processes and restarts them. The default health check interval is 30 seconds.

falcon serve introduces a new --health-check-timeout option to configure the health check timeout. falcon.rb/falcon host can be changed using the health_check_timeout key within the container_options configuration - these are passed directly to {ruby Async::Container}. If you don't want a health check, set health_check_timeout to nil.

Falcon Server Process Title

The Falcon server process title is now updated periodically (alongside the health check) to include information about the numnber of connections and requests.

12211 ttys002    0:00.28 /Users/samuel/.gem/ruby/3.4.1/bin/falcon serve --bind http://localhost:8000      
12213 ttys002    0:04.14 http://localhost:8000 (C=2/2 R=0/49.45K L=0.353)
12214 ttys002    0:07.22 http://localhost:8000 (C=5/6 R=0/112.97K L=0.534)
12215 ttys002    0:05.41 http://localhost:8000 (C=3/3 R=0/71.7K L=0.439)
12216 ttys002    0:06.46 http://localhost:8000 (C=4/5 R=0/93.22K L=0.493)
12217 ttys002    0:02.58 http://localhost:8000 (C=1/1 R=0/24.9K L=0.251)
12218 ttys002    0:05.44 http://localhost:8000 (C=3/3 R=0/72.12K L=0.439)
12219 ttys002    0:06.47 http://localhost:8000 (C=4/4 R=0/93.13K L=0.493)
12220 ttys002    0:04.03 http://localhost:8000 (C=2/2 R=0/47.37K L=0.357)
12221 ttys002    0:06.41 http://localhost:8000 (C=4/4 R=0/92.46K L=0.494)
12222 ttys002    0:06.38 http://localhost:8000 (C=4/4 R=0/91.71K L=0.495)
  • C – Connections: (current/total) connections accepted by the server
  • R – Requests: (current/total) requests processed by the server
  • L – Scheduler Load: A floating-point value representing the event loop load

Note, if you are using htop, you should enable "Setup" → "Display Options" → "[x] Update process names on every refresh" otherwise the process title will not be updated.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 32 commits:

↗️ async-container (indirect, 0.18.3 → 0.23.2) · Repo · Changelog

Release Notes

0.23.0 (from changelog)

Add support for NOTIFY_LOG for Kubernetes readiness probes.

You may specify a NOTIFY_LOG environment variable to enable readiness logging to a log file. This can be used for Kubernetes readiness probes, e.g.

containers:
	- name: falcon
		env:
			- name: NOTIFY_LOG
				value: "/tmp/notify.log"
		command: ["falcon", "host"]
		readinessProbe:
			exec:
				command: ["sh", "-c", "grep -q '\"ready\":true' /tmp/notify.log"]
			initialDelaySeconds: 5
			periodSeconds: 5
			failureThreshold: 12

0.21.0 (from changelog)

  • Use SIGKILL/Thread#kill when the health check fails. In some cases, SIGTERM may not be sufficient to terminate a process because the signal can be ignored or the process may be in an uninterruptible state.

0.20.1 (from changelog)

  • Fix compatibility between {ruby Async::Container::Hybrid} and the health check.
  • {ruby Async::Container::Generic#initialize} passes unused arguments through to {ruby Async::Container::Group}.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 55 commits:

↗️ io-endpoint (indirect, 0.14.0 → 0.15.2) · Repo

Commits

See the full diff on Github. The new version differs by 8 commits:

↗️ protocol-rack (indirect, 0.11.1 → 0.11.2) · Repo

Commits

See the full diff on Github. The new version differs by 4 commits:

🆕 async-container-supervisor (added, 0.5.1)

🆕 memory-leak (added, 0.5.2)

🗑️ process-metrics (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Go to the Depfu Dashboard to see the state of your dependencies and to customize how Depfu works.

@depfu depfu bot added the depfu label Mar 2, 2025
@depfu
Copy link
Copy Markdown
Contributor Author

depfu bot commented Mar 9, 2025

Closed in favor of #776.

@depfu depfu bot closed this Mar 9, 2025
@depfu depfu bot deleted the depfu/update/falcon-0.51.0 branch March 9, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants