Vapor: Postgres Improvements
In the latest release of Vapor, we’ve made some big improvements to our support for Postgres.
Joe Dixon
In the latest release of Vapor, we’ve made some big improvements to our support for Postgres.
Joe Dixon
In the latest release of Spark Stripe, we're happy to introduce support for Customer Balances. With this new addition, customers will be able to view their current balance and top up their balance:  This feature provides a convenient way for customers whose credit cards do not support recurring payments to utilize your products and services by topping up their account with an on-session, manual payment before subscribing. Payments are handled by Stripe's Checkout page and customers may choose the amount of money they wish to add to their balance. For more information, dig into the [Spark documentation](https://spark.laravel.com/docs/2.x/spark-stripe/configuration.html). We hope you enjoy this new feature of Laravel Spark!
Dries Vints
After a few beta releases, today we've finally reached the first stable release of Pint. And, starting with next week's release of Laravel, Pint will be included on every new Laravel application as a `dev` dependency.
Nuno Maduro
Aside from provisioning servers and creating sites, Laravel Forge does so much more, including deploying code to your sites.
James Brooks
Every application running on Vapor is powered by AWS Lambda, which allows us to run code without needing to think about servers. One of the biggest benefits of this type of infrastructure is that it allows our applications to automatically scale to meet demand with little to no capacity planning. In order to better understand how much an application can be scaled with Lambda, it’s important to familiarize ourselves with one of its core concepts - concurrency. [According to AWS](https://aws.amazon.com/blogs/compute/managing-aws-lambda-function-concurrency/), concurrency in Lambda is “the number of executions of your function code that are happening at any given time. executed simultaneously.” So given the default limit on a new AWS account is 1,000 concurrent executions, a web application can process 1,000 requests simultaneously. This sounds simple; however, there is more than meets the eye if we keep digging. ## Reserved concurrency The concurrency limit applied by AWS is shared across all of the functions on an individual account. This means that if one function on the account is executing at the concurrency limit, other functions will be prevented from executing at the same time. In order to mitigate this, each individual function can reserve capacity from the overall account concurrency pool. For example, to ensure there are always 100 functions ready to respond, you would set the value of “Reserved concurrency” to 100. Note that if the concurrency of this function hits the reserved limit, it will not then pull from the unreserved pool. This means 100 becomes the maximum simultaneous invocations for that function. To interact with this setting in your Vapor project, you may update the `concurrency` option of your `vapor.yml` file in order to limit the number of HTTP requests which can be handled at any one time, and the `queue-concurrency` option may be updated to limit the number of queued jobs which can be processed at any one time. For more information, you may visit the concurrency documentation for [environments](https://docs.vapor.build/1.0/projects/environments.html#concurrency) and [queues](https://docs.vapor.build/1.0/resources/queues.html#queue-concurrency). ## Unreserved concurrency As you may have guessed, unreserved concurrency is any concurrency remaining which has not been explicitly reserved. AWS will reserve 100 invocations for all non-concurrency reserved functions. This means it’s only possible to reserve 900 invocations across all functions on an account without requesting AWS to increase the limit. ## Provisioned concurrency When reading about serverless applications, you may have encountered the term “cold start”. A cold start is when a serverless function takes a longer time than usual to execute. It arises when a function is inactive because it hasn’t been executed recently and the cloud provider must initialize the environment before it can run. When the function has been executed once, it will remain warm for a period of time and subsequent execution time will be much faster. Provisioned concurrency can be used to alleviate this issue by initializing a given number of execution environments and keeping them ready to respond immediately to execution requests. There is [a cost](https://aws.amazon.com/lambda/pricing/) associated with utilizing provisioned concurrency. It’s also worth noting that provisioned concurrency counts towards a function’s reserved concurrency. You cannot allocate more provisioned concurrency than you have reserved. To utilize provisioned concurrency with your Vapor project, you may update the `capacity` option of your vapor.yml file. If you would like similar functionality, but without the added cost, you may want to consider at prewarming, which can also be configured from your vapor.yml file. For more information about using this functionality in your Vapor project, you may visit the documentation for [provisioned concurrency](https://docs.vapor.build/1.0/projects/environments.html#concurrency) and [prewarming](https://docs.vapor.build/1.0/projects/environments.html#prewarming). ## Throttling Throttling occurs when there is not enough concurrency to process the number of required executions. For example, imagine the reserved concurrency on a Lambda function is set to 10 and that Lambda function is triggered when a job is added to an SQS queue. If that queue has 10 or more jobs added to it simultaneously, there is not enough concurrency to process all the jobs and those that didn’t get processed will end up back on the queue. The impact of throttling depends on how the function is being used. In the case of Vapor, that can be one of three things: 1. HTTP Requests - When a request hits API Gateway or an Application Load Balancer, it sends the request to Lambda for processing. If the Lambda invocation is throttled, an error response will be returned from your API. 2. Queued Jobs - Vapor configures SQS to trigger a Lambda function when a job is added to the queue. If the Lambda invocation is throttled, the job will be added back to the queue. 3. CLI - Commands and scheduled tasks are handled by Lambda. Should the invocation be throttled, the command will fail. ## Monitoring The AWS console has some great monitoring tools that allow you to see how your Vapor application is performing. To dig in, login to AWS > [Navigate to the Lambda service](https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/functions) > Click on the relevant function > Click on the Monitor tab. This dashboard provides a multitude of metrics to help you monitor your environment, such as a log of invocations, charts showing successful invocations, throttled invocations, and invocations that returned an error. ## Managing Concurrency If you notice that your Lambda function is regularly being throttled, it may be time to consider tweaking your configuration. If there is another function on the account dominating invocations, it may be possible to limit its concurrency to free up the unreserved pool for those functions being throttled. You could consider reserving some concurrency of the function being throttled to ensure it always has the capacity it needs to run. Finally, if you have exhausted all options to successfully share the concurrency pool on your account, you may contact AWS and ask for your pool to be extended. The 1,000 concurrent invocation limit is a soft-limit which, according to the [documentation](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html) can be increased to "tens of thousands".
Joe Dixon
Today, we are excited to announce that you may create Vapor projects by simply connecting your GitHub account and letting Vapor do the rest! Need more details? Here's what we mean. Starting today, Vapor can create a new GitHub repository, deploy the new application to Vapor, and configure GitHub actions to deploy to Vapor each time you push fresh code to your new application.
Nuno Maduro
Today we’re pleased to announce that you can now see the real-time output from your deployments as they happen. You can see the live deployment output in the Deployments panel of any site that is actively deploying.
James Brooks
Today we're excited to launch a new feature for Spark Stripe: manual payment retries! When a customer's recurring payment fails, Stripe will typically re-attempt the payment a few days later. However, sometimes a payment fails because of an expired payment method. Once the customer updates their payment information within the Spark billing portal, they often want to immediately retry the payment to make sure it will be successful. Previously, the customer would have to contact you and ask you to re-attempt the charge manually. However, now customers can re-attempt the charge themselves within Spark! As you can see below, Spark's invoice list will now display a list of paid and unpaid invoices:  From the invoice list, the customer can click the "Retry Payment" link to re-attempt a failed payment:  Of course, the customer will be notified if the re-attempted charge also fails. To make this feature more obvious to customers, customers are also now informed they can re-attempt failed payments as soon as they update their payment method details:  We hope you enjoy this new feature. If you haven't tried Laravel Spark, now is a great time to start! [Spark](https://spark.laravel.com) makes it a cinch to offer recurring subscription plans to your customers via Stripe or Paddle.
Dries Vints
We are thrilled to announce that applications may now have unlimited public assets and the 400 public assets hard limit has been removed. In addition, we have made multiple performance enhancements to our deployment pipeline that uploads assets to S3. So, asset uploads are now up to 10x faster.
Nuno Maduro
We're excited to announce that Laravel Forge now supports Ubuntu 22.04 (Jammy) - the latest Ubuntu LTS release from Canonical!
James Brooks
Laravel is the most productive way to
build, deploy, and monitor software.