diff --git a/haystack/components/writers/document_writer.py b/haystack/components/writers/document_writer.py
index f4debb17..170ee24d 100644
--- a/haystack/components/writers/document_writer.py
+++ b/haystack/components/writers/document_writer.py
@@ -15,11 +15,15 @@ class DocumentWriter:
     A component for writing documents to a DocumentStore.
     """
 
-    def __init__(self, document_store: DocumentStore, policy: DuplicatePolicy = DuplicatePolicy.FAIL):
+    def __init__(self, document_store: DocumentStore, policy: DuplicatePolicy = DuplicatePolicy.NONE):
         """
         Create a DocumentWriter component.
 
-        :param policy: The policy to use when encountering duplicate documents (default is DuplicatePolicy.FAIL).
+        :param policy: the policy to apply when a Document with the same id already exists in the DocumentStore.
+            - `DuplicatePolicy.NONE`: Default policy, behaviour depends on the Document Store.
+            - `DuplicatePolicy.SKIP`: If a Document with the same id already exists, it is skipped and not written.
+            - `DuplicatePolicy.OVERWRITE`: If a Document with the same id already exists, it is overwritten.
+            - `DuplicatePolicy.FAIL`: If a Document with the same id already exists, an error is raised.
         """
         self.document_store = document_store
         self.policy = policy
diff --git a/haystack/core/component/connection.py b/haystack/core/component/connection.py
index c84c9b5b..c3118aa4 100644
--- a/haystack/core/component/connection.py
+++ b/haystack/core/component/connection.py
@@ -116,21 +116,24 @@ class Connection:
             name_matches = [
                 (out_sock, in_sock) for out_sock, in_sock in possible_connections if in_sock.name == out_sock.name
             ]
-            if len(name_matches) != 1:
-                # TODO allow for multiple connections at once if there is no ambiguity?
-                # TODO give priority to sockets that have no default values?
-                connections_status_str = _connections_status(
-                    sender_node=sender_node,
-                    sender_sockets=sender_sockets,
-                    receiver_node=receiver_node,
-                    receiver_sockets=receiver_sockets,
-                )
-                raise PipelineConnectError(
-                    f"Cannot connect '{sender_node}' with '{receiver_node}': more than one connection is possible "
-                    "between these components. Please specify the connection name, like: "
-                    f"pipeline.connect('{sender_node}.{possible_connections[0][0].name}', "
-                    f"'{receiver_node}.{possible_connections[0][1].name}').\n{connections_status_str}"
-                )
+            if len(name_matches) == 1:
+                # Sockets match by type and name, let's use this
+                return Connection(sender_node, name_matches[0][0], receiver_node, name_matches[0][1])
+
+            # TODO allow for multiple connections at once if there is no ambiguity?
+            # TODO give priority to sockets that have no default values?
+            connections_status_str = _connections_status(
+                sender_node=sender_node,
+                sender_sockets=sender_sockets,
+                receiver_node=receiver_node,
+                receiver_sockets=receiver_sockets,
+            )
+            raise PipelineConnectError(
+                f"Cannot connect '{sender_node}' with '{receiver_node}': more than one connection is possible "
+                "between these components. Please specify the connection name, like: "
+                f"pipeline.connect('{sender_node}.{possible_connections[0][0].name}', "
+                f"'{receiver_node}.{possible_connections[0][1].name}').\n{connections_status_str}"
+            )
 
         match = possible_connections[0]
         return Connection(sender_node, match[0], receiver_node, match[1])
diff --git a/releasenotes/notes/document-writer-default-policy-693027781629fc73.yaml b/releasenotes/notes/document-writer-default-policy-693027781629fc73.yaml
new file mode 100644
index 00000000..b90629fe
--- /dev/null
+++ b/releasenotes/notes/document-writer-default-policy-693027781629fc73.yaml
@@ -0,0 +1,6 @@
+---
+enhancements:
+  - |
+    Change `DocumentWriter` default `policy` from `DuplicatePolicy.FAIL` to `DuplicatePolicy.NONE`.
+    The `DocumentStore` protocol uses the same default so that different Document Stores can choose
+    the default policy that better fit.
diff --git a/releasenotes/notes/fix-connect-with-same-name-5ce470f7f0451362.yaml b/releasenotes/notes/fix-connect-with-same-name-5ce470f7f0451362.yaml
new file mode 100644
index 00000000..529cd69a
--- /dev/null
+++ b/releasenotes/notes/fix-connect-with-same-name-5ce470f7f0451362.yaml
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    Fix `Pipeline.connect()` so it connects sockets with same name if multiple sockets with compatible types are found.

diff --git a/test/components/writers/test_document_writer.py b/test/components/writers/test_document_writer.py
index 9858538f..623d5ee5 100644
--- a/test/components/writers/test_document_writer.py
+++ b/test/components/writers/test_document_writer.py
@@ -16,7 +16,7 @@ class TestDocumentWriter:
             "type": "haystack.components.writers.document_writer.DocumentWriter",
             "init_parameters": {
                 "document_store": {"type": "haystack.testing.factory.MockedDocumentStore", "init_parameters": {}},
-                "policy": "FAIL",
+                "policy": "NONE",
             },
         }
 
diff --git a/test/core/pipeline/test_connections.py b/test/core/pipeline/test_connections.py
index ba4d70ca..a28a038a 100644
--- a/test/core/pipeline/test_connections.py
+++ b/test/core/pipeline/test_connections.py
@@ -386,3 +386,18 @@ def test_parse_connection():
     assert parse_connect_string("foobar") == ("foobar", None)
     assert parse_connect_string("foo.bar") == ("foo", "bar")
     assert parse_connect_string("foo.bar.baz") == ("foo", "bar.baz")
+
+
+def test_connect_with_same_socket_names():
+    SimpleComponent = factory.component_class("SimpleComponent", output_types={"documents": List})
+    ComponentWithMultipleInputs = factory.component_class(
+        "ComponentWithMultipleInputs", input_types={"question": Any, "documents": Any}
+    )
+
+    pipe = Pipeline()
+    pipe.add_component("simple", SimpleComponent())
+    pipe.add_component("multiple", ComponentWithMultipleInputs())
+
+    pipe.connect("simple", "multiple")
+
+    assert list(pipe.graph.edges) == [("simple", "multiple", "documents/documents")]

Auto-connect between pipeline components intermittently failing
**Describe the bug**
The connections between components when using the `.connect()` method of a pipeline are non-deterministic. 

We did find that *explicitly* defining the connection (as showcased in the documentation found [here](https://docs.haystack.deepset.ai/v2.0/docs/transformerssimilarityranker)) worked to resolve this issue, however it seems like it might be possible to ensure that if there *are* default connections that share a name, they be preferentially connected during graph construction.

Hopefully all this makes sense - if not, I'm happy to follow-up!

**Error message**
There is no specific error.

**Expected behavior**
The logic should not connect two components by incompatible IDs or should not default to a random selection/decision.

**Additional context**
Creating connections like this will lead to a semi-random incidence of the pipeline graph being constructed incorrectly:

```python
pipeline.connect("tgi_fetcher", "tgi_converter")
pipeline.connect("tgi_converter", "tgi_splitter")
pipeline.connect("tgi_splitter", "tgi_ranker")
pipeline.connect("tgi_ranker", "tgi_prompt_builder")
pipeline.connect("tgi_prompt_builder", "tgi_llm")
```

![image](https://i.imgur.com/zUBwJaB.png)

As you can hopefully see, the output of `ranker` (documents) is being connected to the `question` input of the `prompt_builder`. This is despite the fact that the `prompt_builder` has a `documents` input. 

You can get around the error by keying `documents` in your input - and swapping any potential prompt-templates, but this seems like undesirable behaviour.

```python
pipeline.connect("tgi_fetcher", "tgi_converter")
pipeline.connect("tgi_converter", "tgi_splitter")
pipeline.connect("tgi_splitter", "tgi_ranker")
pipeline.connect("tgi_ranker.documents", "tgi_prompt_builder.documents")
pipeline.connect("tgi_prompt_builder", "tgi_llm")
```

**To Reproduce**

```python
prompt_template = """
According to these documents:

{% for doc in documents %}
  {{ doc.content }}
{% endfor %}

Answer the given question: {{question}}
Answer:
"""
prompt_builder = PromptBuilder(template=prompt_template)
fetcher = LinkContentFetcher()
converter = HTMLToDocument()
splitter = DocumentSplitter(split_length=100, split_overlap=5)
llm = GPTGenerator(api_key = openai_api_key, model_name = "gpt-4")
ranker = TransformersSimilarityRanker()

pipeline = Pipeline()
pipeline.add_component(name="fetcher", instance=fetcher)
pipeline.add_component(name="converter", instance=converter)
pipeline.add_component(name="splitter", instance=splitter)
pipeline.add_component(name="ranker", instance=ranker)
pipeline.add_component(name="prompt_builder", instance=prompt_builder)
pipeline.add_component(name="llm", instance=llm)

pipeline.connect("fetcher", "converter")
pipeline.connect("converter", "splitter")
pipeline.connect("splitter", "ranker")
pipeline.connect("ranker", "prompt_builder")
pipeline.connect("prompt_builder", "llm")

question = "What is our favorite animal?"
result = pipeline.run({"prompt_builder": {"question": question},
                       "ranker": {"query": question},
                      "fetcher": {"urls": ["https://haystack.deepset.ai/advent-of-haystack/day-1#challenge"]}})

print(result['llm']['replies'][0])
```

**FAQ Check**
- [x ] Have you had a look at [our new FAQ page](https://docs.haystack.deepset.ai/docs/faq)?

**System:**
 - OS: Linux
 - GPU/CPU: CPU
 - Haystack version (commit or version number): 2.0.0b2
 - DocumentStore: N/A
 - Reader: N/A
 - Retriever: N/A

test/components/writers/test_document_writer.py::TestDocumentWriter::test_to_dict test/core/pipeline/test_connections.py::test_connect_with_same_socket_names
[ test/components/writers/test_document_writer.py::TestDocumentWriter::test_to_dict_with_custom_init_parameters test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict_without_docstore test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict_without_docstore_type test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict_nonexisting_docstore test/components/writers/test_document_writer.py::TestDocumentWriter::test_run test/components/writers/test_document_writer.py::TestDocumentWriter::test_run_skip_policy test/core/pipeline/test_connections.py::test_connect_compatible_types[same-primitives] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-primitive-is-optional] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-type-is-union-of-primitives] test/core/pipeline/test_connections.py::test_connect_compatible_types[identical-unions] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-union-is-superset-of-sender] test/core/pipeline/test_connections.py::test_connect_compatible_types[primitive-to-any] test/core/pipeline/test_connections.py::test_connect_compatible_types[same-class] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-class-is-optional] test/core/pipeline/test_connections.py::test_connect_compatible_types[class-to-any] test/core/pipeline/test_connections.py::test_connect_compatible_types[subclass-to-class] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-type-is-union-of-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-type-is-union-of-superclasses] test/core/pipeline/test_connections.py::test_connect_compatible_types[same-lists] test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-list-is-optional] test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-primitive-to-list-of-any] test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-same-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-subclass-to-list-of-class] test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-classes-to-list-of-any] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-same-primitives] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-primitives-to-nested-sequences-of-any] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-same-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-subclasses-to-nested-sequences-of-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-classes-to-nested-sequences-of-any] test/core/pipeline/test_connections.py::test_connect_compatible_types[same-dicts-of-primitives] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-primitives-to-dict-of-any-keys] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-primitives-to-dict-of-any-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-primitives-to-dict-of-any-key-and-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[same-dicts-of-classes-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-subclasses-to-dict-of-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-classes-to-dict-of-any-keys] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-classes-to-dict-of-any-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-classes-to-dict-of-any-key-and-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mappings-of-same-primitives] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-any-keys] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-higher-level-any-keys] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-any-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-any-keys-and-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mappings-of-same-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-subclasses-to-nested-mapping-of-classes] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-any-keys] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-higher-level-any-keys] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-any-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-any-keys-and-values] test/core/pipeline/test_connections.py::test_connect_compatible_types[same-primitive-literal] test/core/pipeline/test_connections.py::test_connect_compatible_types[same-enum-literal] test/core/pipeline/test_connections.py::test_connect_compatible_types[identical-deeply-nested-complex-type] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[class-to-subclass] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[any-to-primitive] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[any-to-class] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-primitive-is-optional] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-class-is-optional] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-list-is-optional] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-type-is-union] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-union-is-superset-of-receiver] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[partially-overlapping-unions-with-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[partially-overlapping-unions-with-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-lists-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-primitive-to-bare-list] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-primitive-to-list-object] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-lists-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[lists-of-classes-to-subclasses] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-any-to-list-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-any-to-list-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-sequences-of-different-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-nested-sequences-of-same-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-sequences-of-different-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-sequences-of-classes-to-subclasses] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-nested-sequences-of-same-class] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-list-of-Any-to-nested-list-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-list-of-Any-to-nested-list-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-primitive-keys] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-primitive-values] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-class-values] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-class-to-subclass-values] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-keys-to-dict-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-values-to-dict-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-values-to-dict-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-keys-and-values-to-dict-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-keys-and-values-to-dict-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-nested-mappings-of-same-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-primitive-keys] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-higer-level-primitive-keys] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-primitive-values] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-class-values] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-class-to-subclass-values] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-keys-to-nested-mapping-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-higher-level-Any-keys-to-nested-mapping-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-values-to-nested-mapping-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-values-to-nested-mapping-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-keys-and-values-to-nested-mapping-of-primitives] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-keys-and-values-to-nested-mapping-of-classes] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-literal-of-same-primitive] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[subset-literal] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-literal-of-same-enum] test/core/pipeline/test_connections.py::test_connect_non_compatible_types[deeply-nested-complex-type-is-compatible-but-cannot-be-checked] test/core/pipeline/test_connections.py::test_connect_sender_component_does_not_exist test/core/pipeline/test_connections.py::test_connect_receiver_component_does_not_exist test/core/pipeline/test_connections.py::test_connect_sender_socket_does_not_exist test/core/pipeline/test_connections.py::test_connect_receiver_socket_does_not_exist test/core/pipeline/test_connections.py::test_connect_many_outputs_to_the_same_input test/core/pipeline/test_connections.py::test_connect_many_connections_possible_name_matches test/core/pipeline/test_connections.py::test_connect_many_connections_possible_no_name_matches test/core/pipeline/test_connections.py::test_parse_connection