• Overview
    Key features
    • Observability
    • Auto-scaling
    • Multiframework
    • Security
    Frameworks
    • Django
    • Next.js
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Languages
    • PHP
    • Python
    • Node.js
    • Ruby
    • Java
    • Go
  • Industries
    • Consumer Goods
    • Media/Entertainment
    • Higher Education
    • Government
    • Ecommerce
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Login
  • Request a demo
  • Free Trial
Meet Upsun. The new, self-service, fully managed PaaS, powered by Platform.sh.Try it now
Blog

Introducing our new API and Metrics servers upgrades

apiupdates
14 Dec, 2022
Rémi Lejeune
Rémi Lejeune
Product Manager

We are all about providing the best web application deployment experience on the market. Working to ensure that our product is delivering the quality we promise with regular product updates and new features being introduced all the time. And that’s exactly why we’re here! 

We’re delighted to share the new version of our API server and Metrics server, designed to optimize transparency, crons, builds and sources operations control- to name but a few. Ready to find out more? Keep on scrolling. 

What are these servers?

The API server responds to API calls performed directly by the Console and the CLI - it’s also the Git version control server. 

The Metrics server  retrieves CPU, Ram, and disk information about the containers so you know exactly how your websites and applications are performing. 

Benefits 

Hashed expressions in cron

Finding the appropriate expression for a cron job isn’t always a simple task. That’s why, we now support the Jenkins ‘H’ pattern in our cron job expressions. But, what exactly does that mean? 

The Jenkins ‘H’ pattern indicates that a “hashed” value must be substituted, Platform.sh will now hash the name of the cron and use it accordingly. For example, instead of using a fixed expression of, “20 * * * *” which indicates 20 minutes after the hour, every hour. The Jenkins ‘H’ pattern - “H * * * *” - indicates that the task is performed every hour at an unspecified, but invariant time for each task. This allows you to spread out tasks over time, rather than having all of them start at the same time or manually distributing them. 

So, what will this look like? Well, the following cron will hash “my_command” and use the hash to determine a minute value. Changing the command or other parameters won’t change the hash, and as a result, won’t change the schedule. 

my_command:
       spec: 'H * * * *'
       commands:
           start: echo "Hello World!"

 

Result filter for activity script

You can now configure if a custom script is triggered on success or failure. A new configuration has been added to specify the result to start a script. 

For example, the following commands runs the script “backup-notifications.js” when an “environment.backup” event fails: 

platform integration:add --type script --file backup-notifications.js --events="environment.backup" --environments=master --states=complete --result=failure

 

Cancellable build and source operation

We all know that feeling when you push a modification, only to realize that it won’t work one second later. Then you’re faced with the prospect of having to wait for the build, and waste unnecessary CPU cycles before being able to start a new build. Not fun. 

Today, you can cancel any build and source operation activities. That means no need to open a support ticket anymore. To cancel an activity, all you have to do is retrieve the activity ID with the command: platform activity:list. Then cancel the activity with the command: platform activity:cancel {activity_id}

This feature is already available in the CLI and very soon, a cancel button will be added into Console. 

Clear build cache activity 

Last, but not least, the CLI project:clear-build-cache command creates an activity of the type project.clear_build_cache.

This CLI command can be invoked to clear the build cache, enabling you to start from an empty cache, effortlessly. 

This activity is already visible through the API and the CLI, and will be on Console very soon. 

How do I get the upgrade? 

You will get it automatically.

The servers will be upgraded, so there’s no need for your team to lift a finger. 

In the coming months you will be able to track the progress of the upgrades as they will be visible as activities with a comprehensive changelog. These activities will go through 3 different stages: Pending, Running, and Complete. When the upgrade is complete, it will be moved into the recent activities list. 

Is there any impact on my sites?

There’s no need to worry about website downtime as during the API Server upgrade, only actions performed through the CLI and Console may be temporarily affected for just a few minutes. Meanwhile, for the Metrics Server upgrade, no metrics will be lost, only slightly delayed as they will be integrated as soon as the server is upgraded.

We've introduced even more upgrades to our API server - find out more here

Get the latest Platform.sh news and resources
Subscribe

Related Content

A festive treat: PHP 8.3 is already available on Platform.sh

A festive treat: PHP 8.3 is already available on Platform.sh

Company
AboutSecurity and complianceTrust CenterCareersPressContact us
Thank you for subscribing!
  •  
Field required
Leader Winter 2023
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceAcceptable Use PolicyManage your cookie preferencesReport a security issue
© 2024 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺