Console Login

Escaping Vendor Lock-in: A Pragmatic Hybrid Cloud Strategy for Norwegian Enterprises

The "Cloud-First" Honeymoon is Over. It's Time for Architecture.

It has been exactly two months since GDPR enforcement began on May 25th. If you are like most CTOs in Oslo right now, you are likely exhausted from compliance audits and data mapping exercises. But while we were all distracted by privacy policies, another threat has been creeping into our infrastructure: Total Vendor Lock-in.

We see it constantly. A startup deploys everything to AWS eu-central-1 (Frankfurt). It works fine until the bill arrives, or until a fiber cut in Germany spikes latency for users in Trondheim. With the recent announcement of Microsoft planning datacenters in Norway, the hype is building, but the reality for July 2018 is simple: The hyperscalers are not physically here yet.

If you need single-digit millisecond latency to NIX (Norwegian Internet Exchange) and strict data sovereignty under Datatilsynet's watchful eye, you cannot rely purely on a cloud region in Ireland. You need a Hybrid Multi-Cloud strategy.

The Architecture: The "Fortress and Fleet" Model

The most pragmatic approach we are seeing in 2018 isn't about abandoning AWS or Google Cloud Platform (GCP). It is about using them strictly for what they are good at: elasticity. We call this the "Fortress and Fleet" model.

  • The Fortress (CoolVDS): Your core database, stateful services, and sensitive customer data reside on high-performance, local NVMe VPS instances in Norway. This ensures compliance and raw I/O performance without the "IOPS tax" of public cloud block storage.
  • The Fleet (Public Cloud): Stateless frontend containers or worker nodes that scale up during traffic spikes and vanish when not needed.
Pro Tip: In 2018, bandwidth costs between clouds are the killer. Design your application so that ingress traffic is free/cheap and only essential data flows back to the Fortress. Use a VPN tunnel to secure this link, not public internet exposure.

Step 1: Infrastructure as Code with Terraform (v0.11)

Managing two environments manually is a recipe for disaster. We rely on HashiCorp's Terraform. While we are all waiting for the rumored 0.12 update, the current 0.11 syntax is the standard for defining resources.

Here is how we provision the "Fleet" side while referencing our static "Fortress" IP addresses. Note the variable interpolation syntax distinct to version 0.11:

variable "coolvds_fortress_ip" {
  description = "The static IP of our Master DB in Norway"
  default     = "185.x.x.x"
}

resource "aws_security_group" "allow_fortress_vpn" {
  name        = "allow_vpn_from_norway"
  description = "Allow VPN traffic from CoolVDS"

  ingress {
    from_port   = 1194
    to_port     = 1194
    protocol    = "udp"
    cidr_blocks = ["${var.coolvds_fortress_ip}/32"]
  }

  egress {
    from_port   = 0
    to_port     = 0
    protocol    = "-1"
    cidr_blocks = ["0.0.0.0/0"]
  }
}

Step 2: The Glue – High Availability with HAProxy

To route traffic intelligently between your local Norwegian instances and the cloud fleet, HAProxy 1.8 is the tool of choice. Unlike Nginx, HAProxy provides superior observability into the health of your backends.

We deploy HAProxy on the CoolVDS edge nodes. This allows us to serve Norwegian users directly from the local node (ensuring <5ms latency) while offloading international traffic or overflow to the public cloud.

Configuration Snippet: Weighted Round Robin

This configuration prefers the local servers (s1, s2) and only bleeds traffic to the cloud (cloud-1) when load is high.

global
    log /dev/log    local0
    log /dev/log    local1 notice
    maxconn 4096
    user haproxy
    group haproxy

defaults
    log     global
    mode    http
    option  httplog
    option  dontlognull
    timeout connect 5000
    timeout client  50000
    timeout server  50000

backend web_servers
    balance roundrobin
    # Local CoolVDS instances - High weight, low latency
    server local-node-01 10.8.0.1:80 check weight 100
    server local-node-02 10.8.0.2:80 check weight 100
    
    # Cloud Burst Instance - Lower weight, higher latency backup
    server aws-fra-01 10.8.0.3:80 check weight 10 backup

Step 3: Database Performance & Data Sovereignty

Running a database on public cloud block storage (like EBS gp2) can be frustrating. You pay for capacity, but IOPS are often throttled unless you pay a premium for "Provisioned IOPS".

By hosting your Master MySQL database on a CoolVDS NVMe instance, you get raw hardware performance. In our benchmarks involving a Magento 2 deployment (which is notoriously I/O heavy), moving the database from a standard cloud instance to a dedicated-resource KVM VPS reduced page load times by 40%.

However, you must configure InnoDB correctly to utilize that RAM and NVMe speed. Default settings in MySQL 5.7 are often too conservative.

[mysqld]
# Allocate 70-80% of RAM if this is a dedicated DB server
innodb_buffer_pool_size = 8G

# Essential for SSD/NVMe drives
innodb_io_capacity = 2000
innodb_io_capacity_max = 4000
innodb_flush_neighbors = 0

# Ensure durability (ACID) but consider setting to 2 if you tolerate 1s data loss for speed
innodb_flush_log_at_trx_commit = 1

# Binary logging for replication to the cloud fleet
log_bin = /var/log/mysql/mysql-bin.log
server_id = 1

The Latency Reality Check

Let's talk physics. Light speed is finite.

Route Approx. RTT (Ping)
Oslo -> Oslo (CoolVDS) ~2 ms
Oslo -> Frankfurt (AWS/GCP) ~25-30 ms
Oslo -> Ireland (AWS) ~35-40 ms

For a standard brochure site, 30ms doesn't matter. For a high-frequency trading bot, a real-time gaming server, or a complex API making 50 internal calls per request, that latency stacks up immediately. Hosting the "brain" of your application in Norway isn't just about patriotism; it's about physics and user experience.

Conclusion: Own Your Core, Rent the Burst

The smartest TCO (Total Cost of Ownership) play in 2018 is not "All-in Cloud" or "All-in On-Prem." It is the hybrid mix. Keep your data under Norwegian jurisdiction and on high-speed NVMe storage where you control the resources.

Don't let latency or vendor lock-in dictate your architecture. Build your Fortress.

Ready to secure your core infrastructure? Deploy a high-performance KVM instance in Oslo today with CoolVDS.