Skip to content

Commit 72b657e

Browse files
RoRoJofranc
andauthored
feat(nw): Getting the most from Private Networks / Pulic Connectivity Best Practices (#3797)
* feat(vpc): best practices * feat(vpc): continued content * feat(ipam): continued doc * feat(vpc): getting most from private networks * fix(vpc): continued doc * fix(ipam): continued content * fix(nw): finished docs * feat(nw): best practice docs * fix(ipam): modification review * fix(network): add to menu * Apply suggestions from code review Co-authored-by: Océane <[email protected]> * Update network/vpc/reference-content/getting-most-private-networks.mdx --------- Co-authored-by: Océane <[email protected]>
1 parent 8ba9182 commit 72b657e

File tree

6 files changed

+264
-1
lines changed

6 files changed

+264
-1
lines changed

menu/navigation.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2836,6 +2836,10 @@
28362836
{
28372837
"label": "Understanding routing",
28382838
"slug": "understanding-routing"
2839+
},
2840+
{
2841+
"label": "Getting the most from Private Networks",
2842+
"slug": "getting-most-private-networks"
28392843
}
28402844
],
28412845
"label": "Additional Content",
@@ -2916,7 +2920,17 @@
29162920
],
29172921
"label": "API/CLI",
29182922
"slug": "api-cli"
2919-
}
2923+
},
2924+
{
2925+
"items": [
2926+
{
2927+
"label": "Public connectivity: best practices",
2928+
"slug": "public-connectivity-best-practices"
2929+
}
2930+
],
2931+
"label": "Additional Content",
2932+
"slug": "reference-content"
2933+
}
29202934
],
29212935
"label": "IPAM",
29222936
"slug": "ipam"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
meta:
3+
title: IPAM - Additional content
4+
description: IPAM additional content
5+
content:
6+
h1: IPAM - Additional content
7+
paragraph: IPAM additional content
8+
---
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
meta:
3+
title: Public connectivity - best practices
4+
description: Discover essential best practices for securing and optimizing public connectivity in your Scaleway cloud environment. Learn how to enhance performance and ensure robust protection.
5+
content:
6+
h1: Public connectivity - best practices
7+
paragraph: Discover essential best practices for securing and optimizing public connectivity in your Scaleway cloud environment. Learn how to enhance performance and ensure robust protection.
8+
tags: flexible-ip public-ip private-network connectivity best-practice
9+
dates:
10+
validation: 2024-09-30
11+
posted: 2024-09-30
12+
categories:
13+
- network
14+
---
15+
16+
This document sets out best practices for securing and optimizing public connectivity for your Scaleway resources.
17+
18+
## Public vs private connectivity
19+
20+
Public vs private connectivity defines how resources are accessed and exposed over networks.
21+
22+
- **Public connectivity**: Your resource has a [public IP address](/network/ipam/concepts/#public-flexible-ip-address) and is reachable over the public internet. Anyone with the right credentials can access the resource via its public IP address, e.g. over an [SSH connection](/compute/instances/how-to/connect-to-instance/) or simply by directly accessing its IP address in a browser to retrieve and display any content it is serving, e.g. over HTTP.
23+
- **Private connectivity**: Your resources is reachable over an attached [Private Network](/network/vpc/concepts/#private-networks). The resource has a [private IP address](/network/vpc/concepts/#private-ip-address), but it can only be accessed via this address from within the VPC of the Private Network. Such a resource may or may not also have a public IP address.
24+
25+
## Effectively managing IP addresses
26+
27+
### Flexible IP addresses: definition
28+
29+
Public connectivity for **Instances**, **Elastic Metal**, **Load Balancers** and **Public Gateways** is facilitated by a [flexible IP address](/network/ipam/concepts/#public-flexible-ip-address).
30+
31+
- A flexible IP address is a public IP address that you can attach and detach from the resource at will.
32+
- If you detach it, it returns to the pool of flexible IP addresses kept in your account for that product, and you can attach it to a different resource (or reattach it to the same one as before).
33+
- Flexible IP addresses are scoped to a single product and a single Availability Zone (AZ). If you create a flexible IP address for an Instance in PAR-2, you can move it to a different Instance in PAR-2, but not to an Instance in PAR-1, nor to an Elastic Metal server in any AZ.
34+
35+
Other resource types generally facilitate public connectivity in other ways, e.g. via public endpoints that cannot be modified by the user. Public connectivity may be mandatory with no option to deactivate (e.g. for Apple Silicon), or optional (e.g. for Managed Database). See the specific documentation for the product in question to find out more.
36+
37+
### Exploiting the benefits of flexible IPs
38+
39+
As flexible IP addresses can be moved between resources, they provide the following advantages:
40+
41+
- **Seamless failover and disaster recovery**: If your Instance, for example, goes down, you can move its public IP to a different Instance in the same AZ to ensure the service remains available.
42+
- **Zero downtime during maintenance and migration**: When you need to carry out updates, migrations or maintenance on a resource, you can temporarily move its public IP to a backup resource to avoid disruption for users.
43+
- **IP retention and consistent endpoints**: Maintaining the same IP avoids the need for frequent DNS or firewall rule updates, and makes it easier to manage your dynamic cloud environments.
44+
45+
In the future, look out for even more improvements to our flexible IP offering, such as the ability to move flexible IPs between different types of products, and to manage all your public flexible IPs from your [IPAM](/network/ipam/) dashboard.
46+
47+
### Limiting public connectivity, prioritizing Private Networks
48+
49+
We strongly recommend that you disable public connectivity on all of your Scaleway resources, unless it is absolutely required. Attaching resources to Private Networks, and limiting their communication to these networks brings the following advantages:
50+
51+
- **Minimized attack surface**: Without a public IP address, the resource is not exposed directly to the internet, decreasing the risk of DDoS or brute force attacks, or unauthorized access.
52+
- **Reduced cost**: Public (flexible) IP addresses are [billed](https://www.scaleway.com/en/pricing/), whereas Private Networks and the private IP addresses that attach resources to Private Networks are free of charge (except for Elastic Metal servers).
53+
- **Improved latency**: Communication between resources over a Private Network is generally faster, as it does not need to be routed through the public internet.
54+
55+
Depending on the resource type, public connectivity can be disabled by:
56+
- Toggling off **Public connectivity** when creating the resource
57+
- Detaching an existing flexible IP address (after resource creation)
58+
- Deactivating public connectivity (after resource creation)
59+
60+
<Message type="note">
61+
For some products, e.g. Apple Silicon, public connectivity cannot be disabled at any stage, and for other resources, eg Managed Databases for Redis, public connectivity options cannot be modified after resource creation. Check the documentation for your specific product to learn more.
62+
</Message>
63+
64+
Favor resources such as Public Gateways and Load Balancers to provide access to the public internet over the Private Network. This allows Instances and other attached resources to send and receive packets to the internet through a single, secure point of access. You can use the Public Gateway's SSH bastion feature to [connect to your resource via its private IP address](/network/public-gateways/how-to/use-ssh-bastion/#how-to-connect-to-a-resource-behind-your-ssh-bastion).
65+
66+
Find out more about how to get the most from Private Network in our [dedicated documentation](/network/vpc/reference-content/getting-most-private-networks/)
67+
68+
## Implementing security controls
69+
70+
Different products offer different security features and controls to help place limits and restrictions on the traffic arriving over your resource's public interface. We strongly recommend that you implement all available measures to minimize security risk and optimize the security of your resource. Some of the available security controls are listed below.
71+
72+
### Instances: Security groups
73+
74+
[Security groups](/compute/instances/concepts/#security-group) act as firewalls, filtering public internet traffic on your Instances. They can be stateful or stateless, and allow you to create rules to drop or allow public traffic to and from your Instance. [Find out how to create and configure security groups](/compute/instances/how-to/use-security-groups/).
75+
76+
### Load Balancers: ACLs
77+
78+
<Macro id="acls" />
79+
80+
Learn how to use the ACL feature in our [dedicated how-to](/network/load-balancer/how-to/create-manage-acls/) and go deeper with our [reference documentation](/network/load-balancer/reference-content/acls/).
81+
82+
### Other controls
83+
84+
For resources such as Instances and Elastic Metal servers, you may wish to implement third-party manual solutions in front of your public services to enhance security, for example:
85+
86+
- Deploying a reverse proxy, e.g. Nginx (/tutorials/nginx-reverse-proxy/), and configuring it to enforce rate limits and to throttle traffic. This helps to prevent abuse and DDOS attacks on your public-facing services.
87+
- Installing a **W**eb **A**pplication **F**irewall that can filter out malicious traffic such as requests containing attack patterns, or requests from blacklisted IPs.
88+
89+
## Handling traffic surges
90+
91+
Exposing your resource to the public internet can present risks of unexpected traffic surges. These may be malicious DDoS attacks, or legitimate surges that are simply the result of high demand. If correct mechanisms are not put in place to deal with high load, you risk facing downtime, service unavailability and performance degradation. A number of possibilities exist to help you handle this scenario:
92+
93+
### Autoscaling
94+
95+
Scaleway currently offers Autoscaling in Public Beta. Autoscaling allows you to dynamically adjust the number of Instances within a given Instance group based on defined scaling policies. Scaling actions (scale up or down) are triggered when the monitored metric exceeds the configured thresholds from your policies. Check out the [API documentation](https://www.scaleway.com/en/developers/api/autoscaling/).
96+
97+
### Load Balancer
98+
99+
Placing a Scaleway Load Balancer in front of your backend servers allows you to expose multiple Instances through a single public IP. The Load Balancer distributes workload across the servers in the backend pool, ensurable scalable and continuously available applications, even during heavy traffic. You can manually add and remove servers from the backend pool as necessary, and configure the best balancing method for your particular needs. Find out more in the [Load Balancer documentation](/network/load-balancer/).
100+
101+
### Edge Services
102+
103+
Available for Load Balancers and Object Storage buckets, Scaleway Edge Services provides a caching service to reduce load on your origin. This means that content can be served directly to users from Edge Services' servers, instead of from your Load Balancer or Object Storage bucket. [Learn more about Edge Services](/network/edge-services/).
104+
105+
### Kubernetes Kapsule
106+
107+
Hosting your containerized application in a managed Kubernetes cluster brings many benefits in terms of scaling and managing fluctuating demand. Kubernetes can automatically adjust the number of running resources within defined limits, based on current demand. It also offers self-healing capabilities in the case of node failure. Find out more in the [Scaleway Kubernetes](/containers/kubernetes/) documentation.
108+
109+
## Monitoring and alerting via Scaleway Cockpit
110+
111+
We recommend that you use [Scaleway Cockpit](/observability/cockpit/) to monitor your resources. Cockpit stores metrics, logs and traces and provides a dedicated dashboarding system on Grafana for easy visualisation. Different metrics are available for different resource types, with metrics for network traffic being available for many, enabling you to monitor connections over the public interface. You can also configure managed and pre-configured alerts for your resources, to receive warnings for potentially abnormal behavior or unusual network activity.
112+
113+
Read more about [Scaleway Cockpit](/observability/cockpit/).
114+
115+
116+
117+
118 KB
Loading
84.9 KB
Loading

0 commit comments

Comments
 (0)