diff --git a/about/faq.mdx b/about/faq.mdx index 11b2b8c..6ba00d8 100644 --- a/about/faq.mdx +++ b/about/faq.mdx @@ -79,7 +79,7 @@ We rely on iroh remaining open source, and are committed to keeping it that way, ## How do iroh and libp2p compare? -Generally, we've put a lot of effort into making iroh "peer to peer connections that *just work*". +Generally, we've put a lot of effort into making "connections that *just work*". This means we've kept the scope small: There's no DHT, swarm, or gossipsub. Instead, what you get are reliable direct [QUIC](https://en.wikipedia.org/wiki/QUIC) connections between iroh endpoints. On top of these, some of said libp2p features can be implemented as *protocols* on top, see for example [iroh-gossip](https://github.com/n0-computer/iroh-gossip/) which provides gossipsub-like functionality. diff --git a/concepts/relays.mdx b/concepts/relays.mdx index 3b3b287..4d64c75 100644 --- a/concepts/relays.mdx +++ b/concepts/relays.mdx @@ -34,7 +34,7 @@ relays provide better performance, security, and uptime guarantees compared to the public relays. Relay code is open source! You can run your own relay server, or [pick a hosting -provider](https://n0des.iroh.computer). +provider](/iroh-online). ## Why this architecture is powerful @@ -76,5 +76,5 @@ required from the application. - [Dedicated infrastructure guide](/deployment/dedicated-infrastructure) - [Relay source code](https://github.com/n0-computer/iroh/tree/main/iroh-relay) - [Relay binary releases](https://github.com/n0-computer/iroh/releases) -- [Managed relay service](https://n0des.iroh.computer) +- [Managed relay service](/iroh-online/relays) diff --git a/connecting/gossip.mdx b/connecting/gossip.mdx index dbaa063..78e96e3 100644 --- a/connecting/gossip.mdx +++ b/connecting/gossip.mdx @@ -122,7 +122,7 @@ println!("Share this ticket to let others join the gossip topic: {ticket}"); You can also use iroh's rendezvous servers to find bootstrap peers for a topic. To do this, you can create an endpoint ticket for relay to use to discover peers. For more information on how to broadcast tickets on the relay -server, see [n0des.iroh.computer](https://n0des.iroh.computer). +server, see [Iroh Online](/iroh-online). ### Picking a topic ID diff --git a/deployment/dedicated-infrastructure.mdx b/deployment/dedicated-infrastructure.mdx index 3e1d032..10c0aa7 100644 --- a/deployment/dedicated-infrastructure.mdx +++ b/deployment/dedicated-infrastructure.mdx @@ -24,7 +24,7 @@ endpoint to use your relay's URL. For detailed information on configuring custom relays, including code examples and API documentation, see the [iroh relay configuration -guide](https://n0des.iroh.computer/docs/relays/managed). +guide](/iroh-online/relays/managed). ## Why use dedicated relays in production? @@ -36,11 +36,11 @@ latency for your specific use case. If you require more control over your relay infrastructure, you can choose to [self-host your own relay](https://github.com/n0-computer/iroh/tree/main/iroh-relay) or [upgrade to -a managed relay service](https://n0des.iroh.computer). This managed relay +a managed relay service](/iroh-online/relays). This managed relay service is monitored by [the n0 team](https://n0.computer) who maintain the iroh project, and offers SLAs around uptime and performance. -[Sign up for a free trial of n0des](https://n0des.iroh.computer) to get access +[Sign up for a free trial of Iroh Online](/iroh-online) to get access to purchase a managed relay with uptime SLAs. diff --git a/deployment/metrics.mdx b/deployment/metrics.mdx index df1daf3..f6482fe 100644 --- a/deployment/metrics.mdx +++ b/deployment/metrics.mdx @@ -37,9 +37,9 @@ As a convenience, the iroh team runs a service that collects Prometheus metrics applications using iroh. To export your metrics to this service, you can use the `iroh-n0des` crate. -First, sign up for an account on [n0des.iroh.computer](https://n0des.iroh.computer/signup) and create a project. +First, sign up for an account on [Iroh Online](/iroh-online) and create a project. Then, follow the instructions in the [iroh-n0des -documentation](https://n0des.iroh.computer/docs/metrics/custom) to set up the exporter in your +documentation](/iroh-online/metrics/custom) to set up the exporter in your application. diff --git a/docs.json b/docs.json index 969d871..f71e14a 100644 --- a/docs.json +++ b/docs.json @@ -11,7 +11,7 @@ "navigation": { "tabs": [ { - "tab": "Docs", + "tab": "Rust Library", "groups": [ { "group": "Getting Started", @@ -71,6 +71,39 @@ "pages": ["about/changelog", "about/roadmap", "about/faq"] } ] + }, + { + "tab": "Iroh Online", + "groups": [ + { + "group": "Getting Started", + "pages": [ + "iroh-online/index", + "iroh-online/quickstart", + "iroh-online/projects", + "iroh-online/access", + "iroh-online/support" + ] + }, + { + "group": "Metrics", + "pages": [ + "iroh-online/metrics/index", + "iroh-online/metrics/how-it-works", + "iroh-online/metrics/custom", + "iroh-online/metrics/endpoint", + "iroh-online/metrics/glossary" + ] + }, + { + "group": "Relays", + "pages": [ + "iroh-online/relays/index", + "iroh-online/relays/public", + "iroh-online/relays/managed" + ] + } + ] } ] }, diff --git a/iroh-online/access.mdx b/iroh-online/access.mdx new file mode 100644 index 0000000..aa2f3b2 --- /dev/null +++ b/iroh-online/access.mdx @@ -0,0 +1,60 @@ +--- +title: "Access Control" +description: "Manage authorization and API keys for your Iroh Online project" +--- + +Some features on your Iroh Online project require authorization. + +Examples of what **doesn't** require authorization: +- Synchronizing data across relays +- [Holepunching](/concepts/holepunching) connections to other iroh endpoints + +Examples of what **does** require authorization: +- Uploading metrics from endpoints to your project +- Creating custom metrics + +# API Keys + +The Iroh Online platform adds access control on top of iroh's permissionless system to control who +can & cannot make use of resources backed by cloud infrastructure. + +Access control in Iroh Online aims to be as minimal as possible, leaving room for your +app to have its own opinion of how access control should work within your app. + +Connections over iroh are end-to-end encrypted, using ED25519 keypairs on either +end of the connection. Iroh Online re-uses ED keys for SSH-style access. + +To authorize endpoints to push metrics to your project, Iroh Online uses API Keys. + +## Creating an API Key + +1. Go to your project dashboard +2. Click on the "API Keys" tab +3. Click "Create API Key" +4. Give your API Key a name +5. Click "Create" + +```rust +use iroh::Endpoint; +use iroh_n0des::Client; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let endpoint = Endpoint::builder().bind().await?; + endpoint.online().await; + + // Use your API key to authenticate + let client = Client::new(&endpoint, "YOUR_API_KEY").await?; + + Ok(()) +} +``` + +See the [quickstart](/iroh-online/quickstart) for a full example of using the Iroh Online client. + +## Permissions + +Right now, API Keys only control access to pushing metrics to your project. +In the future, API Keys may be used to control access to other resources +within your project. If you are interested in permissions or time-based access +control, please [contact us](https://n0.computer/contact). diff --git a/iroh-online/index.mdx b/iroh-online/index.mdx new file mode 100644 index 0000000..4c1d2db --- /dev/null +++ b/iroh-online/index.mdx @@ -0,0 +1,18 @@ +--- +title: "Welcome to Iroh Online" +description: "Iroh Online is a service for managing and monitoring the behavior of networks that are built with iroh" +--- + +### Hello fren, + +The first time you sign up for an account on Iroh Online, you are asked to create a +**project**. A project is your control & monitoring center for your network. +You can provision relays, monitor metrics, create alerts, run simulations, and +manage workflows. + +## Get Started + +- [Quickstart](/iroh-online/quickstart): Learn how to build your first Iroh Online-enabled application. +- [Access](/iroh-online/access): Understand how to manage access control for your Iroh Online project. +- [Metrics](/iroh-online/metrics): Learn about the metrics collected by Iroh Online and how to use them to monitor your network. +- [Relays](/iroh-online/relays): Discover how to provision and manage relay servers for your network. diff --git a/iroh-online/metrics/custom.mdx b/iroh-online/metrics/custom.mdx new file mode 100644 index 0000000..7b52b5b --- /dev/null +++ b/iroh-online/metrics/custom.mdx @@ -0,0 +1,54 @@ +--- +title: "Custom Metrics" +description: "Create behavioral aggregations to monitor the health of your software" +--- + +Custom metrics enable you to create behavioral aggregations that can help you monitor the health of your software. + +## Project-level Metrics + +For free, the Iroh Online platform will calculate the following metrics for all projects: + +- **Connections**: The number of successful and active connections made through the relay servers. +- **Latency**: The time it takes for a request to travel from one endpoint to another. +- **Throughput**: Also known as data transfer rate, this is a measurement of the amount of data processed by the relay server in a given time period. + +## Relay-level Metrics + +Additionally, for projects on the Pro or Enterprise +plans, the Iroh Online platform will calculate the following relay-level metrics: + +- **Holepunching Rate**: The success rate of holepunching attempts made by the relay server. +- **Uptime**: The amount of time the relay server is operational and available to handle requests. + +For a list of all metrics, see the [metrics glossary](/iroh-online/metrics/glossary). + +## Creating Custom Metrics + +These built-in metrics are not always sufficient for monitoring the health of +your application, especially when you have specific performance indicators that are +unique to your use case. + +In this tutorial, we will build our first custom metric which will be based on a +simple iroh-docs protocol implementation. Each time a document is written +successfully, we will report the metric to the Iroh Online platform. + +For a complete example, see the [iroh-ping example on GitHub](https://github.com/n0-computer/iroh-ping). + +```rust +use iroh::Endpoint; +use iroh_n0des::Client; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let endpoint = Endpoint::builder().bind().await?; + endpoint.online().await; + + let client = Client::new(&endpoint, "YOUR_API_KEY").await?; + + // Report a custom metric + client.metric("document_written", 1).await?; + + Ok(()) +} +``` diff --git a/iroh-online/metrics/endpoint.mdx b/iroh-online/metrics/endpoint.mdx new file mode 100644 index 0000000..58b242b --- /dev/null +++ b/iroh-online/metrics/endpoint.mdx @@ -0,0 +1,37 @@ +--- +title: "Endpoint Metrics" +description: "Detailed metrics at the endpoint level for Pro and Enterprise plans" +--- + +On the pro and enterprise plan, you can get more detailed +metrics at the endpoint level. These metrics give you visibility into the behavior +of individual endpoints in your network. This can help you identify performance issues +or bottlenecks that may be affecting specific endpoints. + +Some of the key endpoint-level metrics include: + +- **Request Latency**: The time taken to process requests at the endpoint. +- **Error Rates**: The frequency of errors occurring at the endpoint. +- **Throughput**: The amount of data processed by the endpoint over time. +- **Connection Counts**: The number of active direct connections to the endpoint. + +In the Iroh Online dashboard, you can view these metrics for each endpoint added to +your project. Drilling down into a specific endpoint can be a powerful tool to +identify and resolve issues quickly. + +By monitoring endpoint-level metrics, you can ensure that each node in your +network is performing optimally, leading to a better overall experience for your users. + +## Retention and Lookback + +Projects on the Pro or Enterprise plans have access to +extended retention and lookback for endpoint-level metrics. This allows you to +analyze historical data and identify trends over time, which can be crucial for +long-term performance optimization and troubleshooting. + +Please refer to the pricing page for more details on plan features +and benefits. [Contact us](mailto:contact@n0.computer) if you have any questions about upgrading your plan. + +## Glossary + +For a list of all endpoint-level metrics, see the [metrics glossary](/iroh-online/metrics/glossary). diff --git a/iroh-online/metrics/glossary.mdx b/iroh-online/metrics/glossary.mdx new file mode 100644 index 0000000..39c04ad --- /dev/null +++ b/iroh-online/metrics/glossary.mdx @@ -0,0 +1,94 @@ +--- +title: "Metrics Glossary" +description: "Complete reference of all available metrics in Iroh Online" +--- + +List of all available metrics. Below is a reference grouping of every metric exposed by the frontend metrics registry, organized by level: + +## Project-level metrics + +These metrics are aggregated at the project level (overall project view / dashboard). + +| Metric (group.metric) | Short description | Units | +|---|---|---:| +| direct_data_rate | Measured traffic that doesn't pass through a relay, as a percentage of total traffic | Percentage | +| direct_connection_rate | Measured connections that become direct at least once during the lifetime of the connection | Percentage | +| blobs.egress | Blobs egress | Bytes | +| blobs.ingress | Blobs ingress | Bytes | +| connections.active | Active connections through relay servers | Count | +| latency.p50 | 50th percentile latency between endpoints | Milliseconds | +| latency.p90 | 90th percentile latency between endpoints | Milliseconds | +| latency.p99 | 99th percentile latency between endpoints | Milliseconds | + +## Relay-level metrics + +Metrics in this section relate to relays and relay servers (visibility about relay processes/servers). + +| Metric (group.metric) | Short description | Units | +|---|---|---:| +| relay.bytes_recv | Total bytes received (relay side) | Bytes | +| relay.bytes_sent | Total bytes sent (relay side) | Bytes | +| relay.conns_rx_ratelimited | Connections rate-limited events | Count | +| relay.disco_packets_dropped | Discovery packets dropped | Count | +| relay.disco_packets_recv | Discovery packets received | Count | +| relay.disco_packets_sent | Discovery packets sent | Count | +| relay.disconnects | Disconnect events | Count | +| relay.frames_rx_ratelimited | Frames rate-limited events | Count | +| relay.got_ping | Got ping events | Count | +| relay.other_packets_dropped | Other packets dropped | Count | +| relay.other_packets_recv | Other packets received | Count | +| relay.other_packets_sent | Other packets sent | Count | +| relay.relay_accepts | Relay accepts (new relay connections accepted) | Count | +| relay.send_packets_dropped | Sent packets dropped | Count | +| relay.send_packets_recv | Sent packets received | Count | +| relay.send_packets_sent | Sent packets sent | Count | +| relay.sent_pong | Sent pong events | Count | +| relay.unique_client_keys | Unique client keys observed | Count | +| relay.unknown_frames | Unknown frame types observed | Count | +| relay.websocket_accepts | WebSocket accepts | Count | +| relay.relay_server.connections | Relay server connections | Count | +| relay.relay_server.egress | Number of bytes relayed (egress) | Bytes | + +## Endpoint-level metrics + +These metrics are collected at the endpoint/node level to give per-endpoint visibility. + +| Metric (group.metric) | Short description | Units | +|---|---|---:| +| connection_became_direct | Count of connections that switched from using a relay to a direct connection at least once | Count | +| connection_handshake_success | Count of successfully established secure connections | Count | +| recv_data_ipv4 | Measured data received directly by nodes through IPv4 | Bytes | +| recv_data_ipv6 | Measured data received directly by nodes through IPv6 | Bytes | +| recv_data_relay | Measured data received by nodes through relay (IPv4 or IPv6) | Bytes | +| send_data | Measured data sent from nodes in the network | Bytes | +| send_ipv4 | Amount of data sent directly via IPv4 | Bytes | +| send_ipv6 | Amount of data sent directly via IPv6 | Bytes | +| send_relay | Amount of data sent through relay (measured by nodes sending data) | Bytes | +| send_data_network_down | Data send events when network down | Bytes | +| nodes_contacted_directly | Number of nodes contacted directly | Count | +| nodes_contacted | Number of nodes contacted (any) | Count | +| num_direct_conns_added | Number of direct connections added | Count | +| num_direct_conns_removed | Number of direct connections removed | Count | +| num_relay_conns_added | Number of relay connections added | Count | +| num_relay_conns_removed | Number of relay connections removed | Count | +| recv_datagrams | Received datagrams | Count | +| recv_gro_datagrams | Received GRO datagram counts | Count | +| update_direct_addrs | Direct address update events | Count | +| portmap.external_address_updated | External address updated events | Count | +| portmap.local_port_updates | Local port updates events | Count | +| portmap.mapping_attempts | Mapping attempts (NAT traversal attempts) | Count | +| portmap.mapping_failures | Mapping failures (failed NAT mappings) | Count | +| portmap.pcp_available | PCP (Port Control Protocol) availability events | Count | +| portmap.pcp_probes | PCP probe events | Count | +| portmap.probes_started | Portmap probes started | Count | +| portmap.upnp_available | UPnP availability events | Count | +| portmap.upnp_gateway_updated | UPnP gateway updated events | Count | +| portmap.upnp_probes_failed | UPnP probes failed | Count | +| portmap.upnp_probes | UPnP probe events | Count | +| netreport.report_reports_full | NetReport: reports_full (report fullness events) | Count | +| netreport.report_reports | NetReport: reports (report events) | Count | +| netreport.report_stun_packets_dropped | STUN packets dropped (netreport) | Count | +| netreport.report_stun_packets_recv_ipv4 | STUN packets received (IPv4) | Count | +| netreport.report_stun_packets_recv_ipv6 | STUN packets received (IPv6) | Count | +| netreport.report_stun_packets_sent_ipv4 | STUN packets sent (IPv4) | Count | +| netreport.report_stun_packets_sent_ipv6 | STUN packets sent (IPv6) | Count | diff --git a/iroh-online/metrics/how-it-works.mdx b/iroh-online/metrics/how-it-works.mdx new file mode 100644 index 0000000..ef8ad49 --- /dev/null +++ b/iroh-online/metrics/how-it-works.mdx @@ -0,0 +1,36 @@ +--- +title: "How Metrics Work" +description: "Understanding how Iroh Online collects and processes metrics" +--- + +## What are metrics? + +To enable metrics collection, simply add endpoints to your network through the +Iroh Online dashboard. Metrics will be automatically collected and reported once: +1. The ssh key is uploaded to the platform. +2. The endpoint is built using the uploaded ssh key and Iroh Online platform endpoint id. +3. The endpoint sends metrics data to the project in the Iroh Online platform. + +## How it works + +Once an iroh endpoint is integrated in rust program, you can add an +`iroh_n0des::Client` to begin sending metrics to the Iroh Online platform. + +1. The `iroh_n0des::Client` will automatically detect any running iroh instance in your +endpoint and begin sending metrics as long as the secret and the ssh +key match what has been set up in your project on the Iroh Online platform. +2. Call `endpoint.online().await` before creating the Client. The endpoint must be online before the client is instantiated in order to +authenticate to the platform. +3. Once authenticated, endpoints will start sending granular-level data about their behavior and connection status. +4. Every 10 seconds, the Iroh Online platform will aggregate key project-level metrics which are visible in the project dashboard. + +## Metrics Retention + +Project-level metrics are retained based on your events plan. Please refer to the +pricing page for more details on plan features and benefits. + +Endpoint level metrics are only available on Pro and Enterprise. For projects on +these plans, the amount of endpoint-level raw data retained is calculated on +your purchased metrics package. There is a rolling lookback window for metrics +retention that is based on your metrics package. [Contact +us](mailto:hello@n0.computer) if you need more custom support. diff --git a/iroh-online/metrics/index.mdx b/iroh-online/metrics/index.mdx new file mode 100644 index 0000000..722c002 --- /dev/null +++ b/iroh-online/metrics/index.mdx @@ -0,0 +1,44 @@ +--- +title: "Overview" +description: "Monitor your network with comprehensive metrics collection" +--- + +When you add endpoints to your network, various metrics are collected to help improve +performance and user experience. These metrics include: + +By monitoring these metrics, you can identify bottlenecks and areas for improvement in your application. + +All endpoints added to your network can have these metrics collected and reported to the Iroh Online project dashboard. + +## Project metrics + +All endpoint metrics are aggregated at the project level, to provide insights +into overall network performance. This aggregated data helps in understanding +trends and patterns without exposing individual endpoint details. + +You can also define and collect custom metrics specific to your application's needs. +This allows you to monitor application-specific events and performance +indicators. + +Read more about [custom metrics](/iroh-online/metrics/custom). + +## Endpoint metrics + +On the pro plan or a self-hosted Iroh Online instance, more detailed metrics are +available for each endpoint added to the network. These metrics are available at +the endpoint level, so you can drill down into specific behaviors to better +understand performance issues. Projects that have been upgraded to +Pro or Enterprise plan have access to endpoint-level +metrics retention and lookback. + +Read more about [endpoint metrics](/iroh-online/metrics/endpoint). + + +## Privacy + +All metrics collected are anonymized and aggregated to ensure user privacy. +No personally identifiable information (PII) is collected or stored. The +focus is on overall network performance rather than individual user behavior. + +If you have concerns about data collection, please refer to the +[privacy policy](https://n0des.iroh.computer/legal/privacy). diff --git a/iroh-online/projects.mdx b/iroh-online/projects.mdx new file mode 100644 index 0000000..b2de232 --- /dev/null +++ b/iroh-online/projects.mdx @@ -0,0 +1,10 @@ +--- +title: "Projects" +description: "Your Iroh Online project is an always-online service that helps keep your devices connected" +--- + +##### Your Iroh Online project is an always-online service that helps keep your devices connected, available, and accessible globally. + +The first time you sign up for an account on Iroh Online, you are asked to create a +**project**. A project is your control & monitoring center for your network. +You can provision relays, monitor metrics, create alerts, run simulations, and manage workflows. diff --git a/iroh-online/quickstart.mdx b/iroh-online/quickstart.mdx new file mode 100644 index 0000000..436885c --- /dev/null +++ b/iroh-online/quickstart.mdx @@ -0,0 +1,58 @@ +--- +title: "Quickstart" +description: "Get started with Iroh Online in minutes" +--- + +This guide will walk you through setting up your first Iroh Online-enabled application. + +## Prerequisites + +- An Iroh Online account. [Sign up for Iroh Online](/iroh-online) +- Rust installed on your machine + +## Step 1: Create a Project + +After signing in to Iroh Online, create a new project. This will be your control center for managing relays, metrics, and endpoints. + +## Step 2: Get Your API Key + +Navigate to your project's API Keys tab and create a new API key. You'll need this to authenticate your endpoints. + +## Step 3: Add the Iroh Online Client + +Add the `iroh-n0des` crate to your `Cargo.toml`: + +```toml +[dependencies] +iroh = "0.35" +iroh-n0des = "0.1" +``` + +## Step 4: Connect Your Endpoint + +```rust +use iroh::Endpoint; +use iroh_n0des::Client; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // Create an iroh endpoint + let endpoint = Endpoint::builder().bind().await?; + + // Wait for the endpoint to be online + endpoint.online().await; + + // Create the Iroh Online client with your API key + let client = Client::new(&endpoint, "YOUR_API_KEY").await?; + + // Your endpoint is now reporting metrics to Iroh Online! + + Ok(()) +} +``` + +## Next Steps + +- [Access Control](/iroh-online/access): Learn how to manage API keys and permissions +- [Metrics](/iroh-online/metrics): Understand the metrics collected by Iroh Online +- [Relays](/iroh-online/relays): Set up dedicated relay servers for your network diff --git a/iroh-online/relays/index.mdx b/iroh-online/relays/index.mdx new file mode 100644 index 0000000..81efd2e --- /dev/null +++ b/iroh-online/relays/index.mdx @@ -0,0 +1,45 @@ +--- +title: "Relays" +description: "Relays route encrypted traffic when direct P2P connections aren't possible" +--- + +# Relays + +##### Relays route encrypted traffic unless a direct, P2P connection is feasible. This approach allows devices to maintain secure, low-latency connection, even in challenging network situations. + +Devices running iroh will attempt to connect to each other directly either on the +local area network (LAN), or over the internet using NAT traversal techniques like +hole punching. + +However, in some situations direct connections are not possible. This can be due to +strict NATs, firewalls, or other network configurations that prevent direct peer-to-peer +connections. + +In these cases, relays provide a reliable fallback mechanism to ensure +connectivity between devices by forwarding traffic between them over the relay +server. This traffic is end-to-end encrypted, so the relay server cannot read +the contents of the communication. + +Relays help in the following ways: +- **NAT Traversal**: Many devices are behind Network Address Translators (NATs) or firewalls that prevent direct connections. Relays help bypass these restrictions by acting as a middleman. +- **Connection Stability**: Relays can provide a stable connection point, especially in cases where direct connections are unreliable. +- **Global Reach**: By using relays located in various geographic locations, devices can connect more efficiently, reducing latency and improving uptime. + +For more information on relays, please refer to the [Relay concepts documentation](/concepts/relays). + +## Hosted Relays + +By default, iroh endpoints will use Iroh Online hosted relays to facilitate connections when direct +peer-to-peer connections are not possible. These relays are managed and +maintained by the Iroh Online team, and are shared by a global public network of +developers. + +However, for production use cases you may want to set up your own private relays, to +ensure that your traffic is not mixed with other users, and to have more control +over the relay infrastructure. + +You can do this in one of two ways: + +1. **[Public Cloud Relays](/iroh-online/relays/public)**: By default, all iroh nodes will connect to the public cloud relays. These relays have no guaranteed uptime and can be subject to noisy neighbors. +2. **[Dedicated Relays](/iroh-online/relays/managed)**: You can have relays run by the number0 team, by adding them to your project through the Iroh Online platform. This is the easiest way to get started with relays, as Iroh Online will handle the setup and maintenance of the relay servers for you. +3. **[Self-hosted](https://github.com/n0-computer/iroh/tree/main/iroh-relay)**: You can set up and manage your own relay servers using the iroh relay software. This gives you full control over the relay infrastructure, but requires more effort to set up and maintain. diff --git a/iroh-online/relays/managed.mdx b/iroh-online/relays/managed.mdx new file mode 100644 index 0000000..ad62335 --- /dev/null +++ b/iroh-online/relays/managed.mdx @@ -0,0 +1,58 @@ +--- +title: "Managed Relays" +description: "Dedicated relay infrastructure managed by the Iroh Online team" +--- + +By default, iroh endpoints will use Iroh Online hosted relays to facilitate connections when direct +peer-to-peer connections are not possible. These relays are managed and +maintained by the Iroh Online team. For production use cases, you will want to set up +your own private relays, to ensure that your traffic is not mixed with other +users, and to have more control over the relay infrastructure. + +If you want to deploy your own hosted relay, you can do that through the Iroh Online +platform, and then add it to your rust client endpoint configuration. + +## Key Benefits + +- **Fully Managed Service**: Number 0's engineering experts handle all day-to-day operations and infrastructure maintenance. +- **Isolation**: Maintain full control over your cloud infrastructure and scaling properties, with no noisy neighbors. +- **Version locking**: Ensure compatibility by locking to specific iroh versions or enable blue/green deployments. +- **Multi-Region & Multi-Cloud Support**: Enhance reliability and performance by deploying relays across various regions and cloud providers. +- **On-prem**: Deploy relays within your own data centers or private clouds for enhanced security and compliance. Please [contact us](mailto:hello@n0.computer) for more information. +- **Custom SLAs**: Tailor service level agreements to meet your specific business needs. Please [contact us](mailto:hello@n0.computer) for more information. + +## Configuration + +```rust +use iroh::Endpoint; +use iroh::relay::RelayUrl; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // Configure your endpoint with dedicated relays + let relay_url1: RelayUrl = "RELAY_URL_1".parse()?; + let relay_url2: RelayUrl = "RELAY_URL_2".parse()?; + + let endpoint = Endpoint::builder() + .relay_mode(iroh::endpoint::RelayMode::Custom(vec![relay_url1, relay_url2])) + .bind() + .await?; + + Ok(()) +} +``` + +## Recommended Relay Setup + +For production use cases, we recommend setting up at least two relays in +different geographic regions. This ensures that if one relay goes down or +becomes unreachable, your endpoints can still connect through the other relay. + +Each relay can handle up to 10,000 concurrent connections, so for larger scale +deployments, you may need to set up multiple relays in each region or [contact +us to increase the size of your relays](mailto:hello@n0.computer). + +## Support policy + +As part of your project-level and relay-level metrics, you will be able to +monitor status of your relays. On the pro plan, we offer priority support. diff --git a/iroh-online/relays/public.mdx b/iroh-online/relays/public.mdx new file mode 100644 index 0000000..a8ba81f --- /dev/null +++ b/iroh-online/relays/public.mdx @@ -0,0 +1,44 @@ +--- +title: "Public Relays" +description: "Free shared relays for development and hobby use" +--- + + +By default, all endpoints will use public shared relays to facilitate connections, both forwarding traffic when direct +peer-to-peer connections are not possible as well as facilitate holepunching for +direct connections. These relays are managed and maintained by [the n0 team](https://n0.computer), +and are shared by a global public network of developers. + +## Support policy + +The public relays will always be available for free and hobby plans, but are not +covered by any SLA or uptime guarantee. + +The public relays will only officially support the latest stable release of +iroh. If older versions of iroh work with the public relay, this is a happy +accident, and not something to be relied upon for production use cases. + +There is no version locking. This means that iroh team reserves the right to remove +support for old versions of iroh from the public relay infrastructure at any +time. + +For version locking, blue/green deployments, multi-region or multi-cloud +support, we recommend that you upgrade to a [managed +relay](/iroh-online/relays/managed). + +## Privacy and Security + +All traffic sent through the public relays is end-to-end encrypted. The relays +are not able to read any of the traffic that they forward or help connect. +However, the relays are able to see metadata about connections, such as source +and destination IP addresses, connection times, and the amount of data +transferred. + +We recommend that you do not use the public relays for sensitive or +confidential data. If you need more control over your relay infrastructure, we +recommend that you upgrade to a [managed relay](/iroh-online/relays/managed) or +[self-host your own relay](https://iroh.computer). + +We monitor the public relays for abuse and malicious activity. If we detect +abuse, we reserve the right to block offending IP addresses or users from +accessing the public relays. diff --git a/iroh-online/support.mdx b/iroh-online/support.mdx new file mode 100644 index 0000000..67fc593 --- /dev/null +++ b/iroh-online/support.mdx @@ -0,0 +1,8 @@ +--- +title: "Support" +description: "Get help with Iroh Online" +--- + +If you're running into issues with Iroh Online, the best place to reach out is on the [iroh discord](https://iroh.computer/discord). + +For uptime SLAs or other enterprise support inquiries, please [contact us](mailto:hello@n0.computer).