• Formerly Platform.sh
  • Contact us
  • Docs
  • Login
Watch a demoFree trial
Blog
Blog
BlogProductCase studiesNewsInsights
Blog

Building and deploying the Symfony ChatGPT app with Upsun

PaaSSymfonySymfonyConmulti-appdeploymentBlackfireScaling
24 December 2025
Share

This blog post is based on a live presentation by Guillaume at a SymfonyCon 2023 on deploying applications with the Upsun platform-as-a-service. We utilized AI tools for transcription and to enhance the structure and clarity of the content.

If you still use File Transfer Protocol (FTP) for deployment, this post is for you. In a 35-minute live session, Guillaume walked through what a Platform as a Service (PaaS) is, why it helps, and how to take a real app from local development to a scalable, observable production environment. 

Before diving into modern solutions, Guillaume posed an interesting question to the audience: "Are there still people deploying with FTP?" The question revealed a telling reality about the current deployment landscape. While some developers have moved to AWS and other cloud platforms, many are still seeking the optimal balance between simplicity and power.

Guillaume brings considerable experience to this discussion, having started his development journey with PHP 3 and Symfony 1.0, which gives him a unique perspective on how deployment practices have evolved over the years.

Building a real-world application

To demonstrate practical deployment scenarios, let’s build a chat application that serves as a wrapper for ChatGPT. The application consists of two main components:

The Backend: A Symfony API that receives prompts via REST, sends them to OpenAI's ChatGPT, and streams responses back to the frontend. The backend stores conversations in a PostgreSQL database and implements real-time streaming using Symfony's StreamResponse functionality.

The Frontend: A React application built with Create React App, handling the user interface and real-time message display.

The streaming implementation is particularly noteworthy. Instead of waiting for ChatGPT to generate a complete response (which could take several seconds), the application streams each chunk of text as it arrives from OpenAI back to the frontend using Server-Sent Events. This approach significantly improves user experience by showing responses as they're generated.

The challenge of streaming applications

Guillaume highlighted a critical scalability issue with streaming applications: "If the response takes three seconds to generate, I've got a PHP worker working for three seconds in the background. If you have 10,000 users using your application at the same time, you need those 10,000 PHP workers running."

This creates a resource allocation problem where workers are tied up waiting for external API responses, even though they're not consuming significant CPU resources. It's a common challenge that many developers face when building real-time applications.

Upsun: a developer-first platform

Upsun represents a new approach to platform-as-a-service specifically for developers who create complex applications with multiple technologies and components. The platform launched on the day of Guillaume's presentation, targeting developers who work with sophisticated, multi-component architectures.

Pick an environmentally conscious region

An interesting aspect of Upsun is its focus on environmental impact. When creating a new project, developers can choose from various cloud regions across AWS, Orange, Azure, and Google Cloud Platform. The platform provides carbon footprint indicators for each region, allowing developers to choose greener hosting options when sovereignty requirements don't mandate specific locations.

Simplified configuration

One of Upsun's key innovations is its approach to configuration. Instead of the complex YAML configurations that plague Kubernetes deployments (often requiring "25 different YAML files from community plugins"), Upsun uses the Symfony CLI to detect project requirements and generate appropriate configurations automatically.

The process is remarkably straightforward:

  1. The Symfony CLI detects your project's PHP version, required extensions, and dependencies
  2. It automatically generates the necessary configuration files
  3. Everything is committed to your repository for reproducible deployments.

Guillaume then added the second app and the routes that split traffic across api. and the main frontend. Conceptually, it looks like this:

# .upsun/config.yaml (illustrative)
routes:
  "https://api.{default_domain}/":
    to: "app:api"
  "https://{default_domain}/":
    to: "app:web"

apps:
  api:
    type: "php:8.3"
    build:
      flavor: composer:2
    extensions: [curl, pdo_pgsql]
    relationships:
      database: "db:postgresql"
  web:
    type: "nodejs:20"
    build:
      commands:
        - "bun install"
        - "bun run build"
    web:
      commands:
        start: "serve -s build -l 8080"

services:
  db:
    type: postgresql

Multi-application Support

For projects with multiple components (like Guillaume's chat application with separate frontend and backend), Upsun handles routing automatically. Developers can define subdomains (such as api and frontend) and the platform manages traffic routing across different application containers.

Deployment in action

The live demonstration showed the entire deployment process, from local development to production:

  1. Project Creation: Using the symfony project:create to set up the Upsun project
  2. Configuration: Automatically generating deployment configurations for both applications
  3. Environment Variables: Setting up external service credentials (like OpenAI API keys) through the CLI
  4. Deployment: A single Symfony deploy command handles building, containerization, and deployment

The platform performs deterministic builds, ensuring that deployments are consistent regardless of individual developer environments. This eliminates the common problem where applications behave differently due to variations in local PHP versions, database versions, or differences in JavaScript tooling.

Performance monitoring and scaling

Upsun includes integrated Blackfire profiling for all environments, providing detailed performance insights without additional setup. This integration revealed that Guillaume's streaming implementation spent 85% of its time waiting for ChatGPT responses, confirming the concerns about resource allocation.

Dynamic resource allocation

Unlike traditional hosting, which locks you into specific plans, Upsun allows for real-time adjustments to resources. Through the CLI or web interface, developers can modify CPU allocation, memory limits, and instance counts on the fly.

Guillaume demonstrated scaling his backend from one to four instances in real-time, with the platform automatically provisioning additional nodes within seconds. This flexibility extends to both horizontal scaling (increasing the number of instances) and vertical scaling (allocating more resources per instance).

Observability: requests, logs, metrics

The platform supports notification-driven scaling, where monitoring systems can automatically trigger resource adjustments. For example, if Blackfire detects response time degradation on checkout transactions at 4 AM, it can automatically increase resources and scale them back down when performance normalizes.

Pricing model

Upsun also includes a resource-based pricing approach. Developers pay per CPU-second and memory-second of actual resource, plus small user license fees. According to Guillaume, a basic production application (like a blog) can run for around $4 per month, while more complex setups typically cost $30-40 monthly.

This model aligns costs directly with usage, avoiding the common problem of paying for unused capacity or being surprised by scaling costs.

Deployment strategies and zero-downtime

Audience questions revealed essential details about Upsun's deployment approach. The platform employs a blue-green deployment strategy, where new container images are built in the background and network connections are switched at the last moment, thereby minimizing downtime.

For applications using database migrations, the platform:

  1. Puts the application in read-only mode
  2. Runs necessary migrations
  3. Switches to the new codebase
  4. Queues and replays any incoming requests that arrived during the transition

This process typically results in 5-10 seconds of apparent latency rather than actual downtime, as requests are queued and processed once the new version is live.

The developer experience focus

Throughout the presentation, Guillaume emphasized that Upsun is built "by developers, for developers" while also considering broader organizational needs. The platform includes features for collaboration across teams, allowing marketing personnel to review pull requests and project managers to monitor deployments and environment status.

This holistic approach recognizes that modern development involves diverse stakeholders beyond just the engineering team.

Why this matters for your team

  • Speed: From local to live in minutes, with repeatable builds.
  • Quality: Profiling and logs on every environment help you ship fixes confidently.
  • Consistency: Git-driven YAML keeps app and infra in one place.
  • Reduced toil: Scale with a command, not a war room.
  • Predictable cost: Pay for the resources you actually use.

Try the flow yourself

Recreate the demo with your own API plus a small frontend:

  1. Generate the config with your framework’s CLI.
  2. Add a second app block for your frontend build.
  3. Define routes for api and the main host.
  4. Commit, deploy, and test using the temporary hostnames.
  5. Add secrets as environment variables and redeploy.
  6. Profile a real request, then scale to match your traffic pattern.

Your first goal is not perfection. It is a clean, repeatable pipeline from commit to production that the whole team can understand. After that, the knobs are there when you need them.

Looking forward

Upsun represents an interesting evolution in platform-as-a-service offerings, focusing on developer experience while maintaining the flexibility needed for complex applications. The combination of automatic configuration, real-time scaling, integrated monitoring, and usage-based pricing addresses many pain points in the current deployment landscape.

As Guillaume noted, "We need to make sure that the product actually fits you super well." The platform's success will ultimately depend on how well it serves the real-world needs of developers building sophisticated applications in today's multi-component, multi-technology environment.

For developers tired of wrestling with complex deployment configurations or locked into inflexible hosting plans, Upsun offers a compelling alternative that promises to simplify the path from code to production while maintaining the control and observability that modern applications require.

Stay updated

Subscribe to our monthly newsletter for the latest updates and news.

Your greatest work
is just on the horizon

Free trial
UpsunFormerly Platform.sh

Join our monthly newsletter

Compliant and validated

ISO/IEC 27001SOC 2 Type 2PCI L1HIPAATX-RAMP
© 2025 Upsun. All rights reserved.